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