This is because Email does not accept SENDTO + mms-URI, but it accepts SENDTO + mailto-URI: http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=blob;f=AndroidManifest.xml;h=025d495010073629df95090c588efad2d2e4fe69;hb=HEAD#l117
Unfortunately, you have to use the SEND action if you want to attach media: http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=blob;f=src/com/android/mms/ui/ComposeMessageActivity.java;h=757c8decf52614033006a929e19a956bc941e095;hb=HEAD#l2412 So, unfortunately, through the SEND intent alone, it is not possible to differentiate between the two. I see 2 options: 1) Leave it as it is. The user can always choose between Messaging or Email. If there are other applications that the user downloads, they can send their image through that as well (for example upload to flickr, send to facebook, etc.). The user can also set MMS as their default application. 2) This is more tricky: a) use the PackageManager to queryIntentActivities() that can handle the SEND_TO with mms URI. b) use the PackageManager to queryIntentActivities() that can handle the SEND with your jpg URI. c) intersect the two results to find all activities that can handle jpg as well as mms. If more than 1 application is found, you could create a custom chooser to let the user choose their favorite MMS jpg sender. SEND the jpg URI to that activity by specifying its component as returned by the PackageManager. Peli www.openintents.org On Jul 17, 6:18 pm, n179911 <[email protected]> wrote: > On Fri, Jul 17, 2009 at 5:01 AM, Peli<[email protected]> wrote: > > > It is always best to look into the source code of the MMS app. > > The Manifest defines *either* SENDTO + mms-URI *or* SEND + media URI: > >http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=blo... > > Peli, > > Thank you for your detailed answer. > I have tried ( SENDTO + mms-URI ) and (SEND + media URI). > But my question is why Android behaves differently in these 2 cases: > > 1. SENDTO + mms-URI case: Android goes straight to ComposeMessageActivity > 2. SEND + media URI case: Android pops up a Selection Dialog for > Picking "Email" or "Messaging", and after I click "Messaging", it goes > to ComposeMessageActivity. > > Is there anyway if I use "SEND + media URI", it goes straight to > ComposeMessageActivity as well? > > Thank you. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

