【问题标题】:Manipulate Native SMS App操作本机 SMS 应用程序
【发布时间】:2014-03-20 16:10:21
【问题描述】:

我在我的应用程序中使用Intent 发送短信,就像

Intent si= new Intent(Intent.ACTION_VIEW);
si.putExtra("sms_body", "some text"); 
si.putExtra("address", "123456789"); 
si.setType("vnd.android-dir/mms-sms");
startActivity(si);

有没有一种方法可以限制用户添加任何额外的文本,禁用本机应用程序的EditText 区域,这可能吗...

【问题讨论】:

    标签: android android-intent


    【解决方案1】:

    而不是通过意图打开短信应用程序为什么不使用短信管理器(方法 sendTextMessage )并从您的应用程序发送短信..

    http://developer.android.com/reference/android/telephony/SmsManager.html

    备注需要权限:http://developer.android.com/reference/android/Manifest.permission.html#SEND_SMS

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多