Skip to content Skip to sidebar Skip to footer

Pass Sms:?body=xyz To Default Browser In Android Webview

I Am Using Webview For Display html page page have link like Forward Which Working Fine In Opera And Default Browser But Not Working In Appl

Solution 1:

There is a mistake in your code.

It should be

if (url != null && url.startsWith("sms")) {

Also: If you have power over the webpage you are displaying you might want to include the phonegap library if you haven't already. That is meant to handle exactly those things.

Solution 2:

You need to create a separate SMS intent with proper type and give SMS write permissions to the application.

IntentsmsIntent=newIntent(Intent.ACTION_VIEW);
smsIntent.setType("vnd.android-dir/mms-sms");
smsIntent.putExtra("address", "Phone number scrapped from url");
smsIntent.putExtra("sms_body","Body of Message scrapped from url");
startActivity(smsIntent);

Post a Comment for "Pass Sms:?body=xyz To Default Browser In Android Webview"