Sorry I don't know much about the MMS app. All I can say is, you definitely shouldn't be setting explicit components for these kinds of things -- that is very much an implementation detail, which can vary across devices and platform releases.
On Thu, Jul 16, 2009 at 9:27 PM, n179911 <[email protected]> wrote: > > Thank you. > > I am trying to resolve/work around a problem which I am having when > launching MMS Activity. > I would like to launch MMS Compose Message Activity with "To:" field > filled and an image attached. > > This works (send to a specified phone #): > intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:1234567")); > This works (attached an image): > intent = new Intent(Intent.ACTION_SEND); > intent.setType(mMimeType); > intent.putExtra("address", item.mValue); > intent.putExtra(Intent.EXTRA_STREAM, mUri); > > But when i combine the 2 together, android can't find an activity for it. > intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:1234567")); > intent.setType("image/jpeg"); > intent.putExtra(Intent.EXTRA_STREAM, mUri); > > even if i put ClassName in the intent: > intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:1234567")); > intent.setType("image/jpeg"); > intent.setClassName("com.android.mms", > "com.android.mms.ui.ComposeMessageActivity"); > intent.putExtra(Intent.EXTRA_STREAM, mUri); > > I really appreciate if you can help me with this. > > Thank you. > > > On Thu, Jul 16, 2009 at 7:41 PM, Dianne Hackborn<[email protected]> > wrote: > > That is not what it is for; it is to specify an Intent that is directly > > targeted to one of your own components. > > > > On Thu, Jul 16, 2009 at 7:32 PM, n179911 <[email protected]> wrote: > >> > >> Hi, > >> > >> I would like to know how to use the setComponent() of Intent. > >> I read the javadoc. But how can I specify the Text Messaging > >> Application when callings setComponent()? > >> > >> > >> * @param component The name of the application component to handle the > >> * intent, or null to let the system find one for you. > >> > >> Thank you. > >> > >> > > > > > > > > -- > > Dianne Hackborn > > Android framework engineer > > [email protected] > > > > 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. > > > > > > > > > > > > > -- Dianne Hackborn Android framework engineer [email protected] 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 [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 -~----------~----~----~----~------~----~------~--~---

