The stock SMS/MMS application handles the SENDTO action with an sms:,
smsto:, mms:, or mmsto: URI.  I can't guarantee that devices shipping with a
custom MMS app will also handle these, though.

On Wed, Jan 13, 2010 at 2:21 AM, 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<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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