Hi

I am having trouble writing a Intent that launches the SMS editor and
that works on all devices across all OS version from 1.5 and up. The
specific problem I am having relates to pre-filling in the adress and
body of the SMS as these do not seem to work uniformly on all
platforms.

I have tried all the below:

public void startSmsIntent(String adress, String body)
{
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.putExtra(”address”, adress);
intent.putExtra(”sms_body”, body);
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(intent);
}

public void startSmsIntent(String adress, String body)
{
Intent sendIntent  = new Intent(Intent.ACTION_VIEW,
Uri.parse("sms:"+adress));
smsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
smsIntent.putExtra("sms_body",body);
this.context.startActivity(smsIntent);
}

public void startSmsIntent(String adress, String body)
{
Intent sendIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("smsto:"+adress+"?body="+body));
startActivity(intent);
}

Does anybody have some usefull input on this and/or the magic method
that simply works on all devices?

Thanks in advance.

-- 
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