简体   繁体   English

更改“使用以下操作完成”对话框

[英]Alter the “Complete action using” dialog

I am writing an app to send an MMS with an image file. 我正在编写一个应用程序,用于发送带有图像文件的彩信。 I wrote the following code 我写了下面的代码

Intent i = new Intent(Intent.ACTION_SEND);
        String sendfilepath = "file://" + sendfile.toString() + ".jpg";
        i.putExtra(Intent.EXTRA_STREAM,Uri.parse(sendfilepath)) ;
        i.setType("image/jpeg");
        startActivityForResult(i, 1) ;

However, the app shows The "Complete action using" dialog to choose from many things like Bluetooth, Email, facebook, Gmail, Handcent SMS, Messaging, play on Device. 但是,该应用程序会显示“使用以下操作完成”对话框,以便从许多内容中进行选择,例如蓝牙,电子邮件,facebook,Gmail,Handcent SMS,消息传递以及在设备上播放。

I would like to show the dialog with only the things that are related to sending SMS or MMS like Messaging and Handcent SMS. 我只想显示该对话框,其中仅包含与发送SMS或MMS相关的内容,例如消息传递和Handcent SMS。 I do not want to show all the other apps. 我不想显示所有其他应用程序。 How can I do that? 我怎样才能做到这一点?

If you have a specific phone number that you are trying to let the user send a message to, use ACTION_SENDTO with a smsto: Uri for the phone number that you want to send the message to. 如果您要尝试让用户向其发送消息的特定电话号码,请将ACTION_SENDTOsmsto: Uri用作要将消息发送至的电话号码。 That definitely works for SMS; 这绝对适用于SMS。 I presume it will work for MMS, but I have not tried that. 我认为它适用于MMS,但是我还没有尝试过。

Otherwise, what you want is not a good idea. 否则,您想要的不是一个好主意。 Your users may wish to share their data via any number of mechanisms, some of which will not be MMS apps. 您的用户可能希望通过多种机制共享其数据,其中某些机制将不是MMS应用程序。 Please let the users choose how to share their data . 请让用户选择如何共享他们的数据

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM