Add intent scheme to be handled by OS

The intent scheme `intent://` is [recommended by Google ](https://developer.chrome.com/multidevice/android/intents) for launching apps. Cordova should forward this to the OS to handle appropriately.

 This closes #183
This commit is contained in:
Gavin Pacini 2016-08-29 16:20:12 +01:00 committed by Julio César
parent 57b50b1d65
commit cc2ec22695

View File

@ -843,7 +843,7 @@ public class InAppBrowser extends CordovaPlugin {
} catch (android.content.ActivityNotFoundException e) {
LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString());
}
} else if (url.startsWith("geo:") || url.startsWith(WebView.SCHEME_MAILTO) || url.startsWith("market:")) {
} else if (url.startsWith("geo:") || url.startsWith(WebView.SCHEME_MAILTO) || url.startsWith("market:") || url.startsWith("intent:")) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));