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<hack...@android.com> 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 <n179...@gmail.com> 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
> 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