This is the expected behaviour. If you are using the implicit intent,
all the applications that accept this kind of data will be shown. You
cannot bypass this by using implicit intents.
Yes, explicit intents are the only solution for you.

But I would suggest to use implicit intent only. Since, the user
should have a choice as to which application should perform the
action.

"I'm also struggling to find official documentation for the "address"
and "sms_body" fields that can be supplied as extra data as per the
above example. Is it expected that these will be supported by the
default messaging app in future SDK versions and in customised UIs
(like HTC's Sense UI)? "

Somebody from Google or Mark can help you with the fields.

Kumar Bibek
http://tech-droid.blogspot.com


On Jan 13, 3:21 pm, Steve <stec...@gmail.com> wrote:
> Hi.  What is the recommended way to launch the messaging app (for
> sending an MMS message) via an intent? The following code works on my
> HTC Magic ...
>
>     Intent intent = new Intent(Intent.ACTION_SEND);
>     intent.putExtra("address", "0215555555");
>     intent.putExtra("sms_body", "my message text");
>     intent.putExtra(Intent.EXTRA_STREAM, imageUri); // imageUri set
> previously
>     intent.setType("image/jpeg");
>     startActivity(intent);
>
> ... but it first launches the Resolver activity
> (com.android.internal.app.ResolverActivity), prompting the user to
> select the appropriate app (Email, Gmail, Messaging, Picasa).  The
> user has to select Messaging before proceeding.
>
> The only way I've found to bypass the resolver is to explicity set the
> desired component on the intent before starting the activity as
> follows:
>
>     intent.setClassName("com.android.mms",
> "com.android.mms.ui.ComposeMessageActivity");
>
> However, I'm guessing this approach will not work on devices that have
> a customised UI, like the HTC Hero.  Can someone confirm/deny?
>
> I'm also struggling to find official documentation for the "address"
> and "sms_body" fields that can be supplied as extra data as per the
> above example. Is it expected that these will be supported by the
> default messaging app in future SDK versions and in customised UIs
> (like HTC's Sense UI)?
>
> Thanks in advance ...
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to