I want to open native application to send sms but there should be already phone number. I found ACTION_SEND but when I'm calling my function it's return error that:
04-26 11:59:15.991: ERROR/AndroidRuntime(20198): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SENDTO (has extras) }
My code presented here:
private void smsSend(String number) {
Intent intent = new Intent(Intent.ACTION_SENDTO, null);
intent.putExtra(Intent.EXTRA_PHONE_NUMBER, number);
startActivity(intent);
}
I know that's is simple but I don't know why it does not work and I can not find any helfull information.
Thanks for any advice.
On my side, the intent without uri parameter work for all devices, except for Pixel Phone where I need to use it, so I check the 2 ways:
Why, this should work fine. http://developer.android.com/reference/android/content/Intent.html#ACTION_SENDTO
Check out my code:
I think you should use the following code:
I think this may help you.
Thanks for the info ! Here is my solution using the previous info:
Best regards.