Filter out non-launchable intents

This commit is contained in:
Ian Clelland 2014-07-22 13:53:33 -04:00 committed by Marcel Kinard
parent 25b8d360da
commit 07f8100058

View File

@ -98,6 +98,9 @@ public class CordovaUriHelper {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
intent.addCategory(Intent.CATEGORY_BROWSABLE);
intent.setComponent(null);
intent.setSelector(null);
this.cordova.getActivity().startActivity(intent);
} catch (android.content.ActivityNotFoundException e) {
LOG.e(TAG, "Error loading url " + url, e);