Try:

    sendIntent.putExtra("address", "123456");

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together
The coverage you need at the price you want

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.


On Sep 17, 4:33 am, Gustav Mauer <gus...@mauer.co.za> wrote:
> I want to send an SMS from an application, but without needing the SMS
> permission, using an intent. This way the user can also decide if he/
> she really wants to proceed to send the SMS. The code looks as
> follows:
>
> Uri smsToUri = Uri.parse("smsto:123456");
> Intent sendIntent = new Intent(Intent.ACTION_VIEW, smsToUri);
> sendIntent.putExtra("sms_body", "Hello dear world");
> sendIntent.setType("vnd.android-dir/mms-sms");
> startActivity(sendIntent);
>
> However, when the SMS screen now shows, the number is not filled in.
> The SMS body is however filled in. This happens on the emulator and on
> a phone. What am I doing wrong please?
--~--~---------~--~----~------------~-------~--~----~
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