Intent definition in Manifest file

♀尐吖头ヾ 提交于 2019-12-24 17:48:51

问题


I would like to start my own SMS editor when user selects "Send message" from contacts application. How do I define intent in manifest file to allow passing contact details to the editor?

Thanks a lot


回答1:


There are many "contacts applications" for Android, not just one. You declined to indicate which "contacts application" you are referring to.

Some "contacts applications" may use ACTION_SENDTO with an smsto: Uri for sending an SMS. In that case, you can add an <intent-filter> to your manifest watching for an android.intent.action.SENDTO <action> and a <data> with scheme of smsto:. That should trigger your activity to be an option for the user.

However, bear in mind that not all "contacts applications" may use this.



来源:https://stackoverflow.com/questions/3798179/intent-definition-in-manifest-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!