ACTION_SEND used to send sms
Thanks for the info ! Here is my solution using the previous info:
if (url.indexOf("tel:") > -1) { startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse(url))); return true; } else if (url.indexOf("sms:") > -1){ startActivity(new Intent(Intent.ACTION_SENDTO, Uri.parse(url))); return true; }
Best regards.
Why, this should work fine. http://developer.android.com/reference/android/content/Intent.html#ACTION_SENDTO
Check out my code:
Uri uri = Uri.parse("smsto:0800000123");
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
it.putExtra("sms_body", "The SMS text");
startActivity(it);
I think you should use the following code:
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
//use to fill the sms body
StringBuilder uri = new StringBuilder("sms:" + mobilenumber);
sendIntent.putExtra("sms_body", "");
sendIntent.setType("vnd.android-dir/mms-sms");
sendIntent.setData("");
startActivity(sendIntent);
I think this may help you.