views:

28

answers:

1

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  A: 

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.

CommonsWare
I am referring to a native contacts application. Please let me know if I should add any extra details. Can you please post an example of such an <intent-filter>? Thanks
Asahi
@Asahi: There is no "native contacts application" in Android. There probably is a "native contacts application" *on your phone*, and what that application is will depend on what phone it is. I do not have an example of listening for `SENDTO` `Intents` -- sorry.
CommonsWare
Got it, thanks.
Asahi