CB-3902: Explicitly add market URIs to CordovaWebViewClient so this always works, not just sometimes

This commit is contained in:
Joe Bowser 2013-06-18 16:19:27 -07:00
parent 4ec3d6d064
commit 98b971b4de

View File

@ -188,6 +188,17 @@ public class CordovaWebViewClient extends WebViewClient {
LOG.e(TAG, "Error sending sms " + url + ":" + e.toString());
}
}
//Android Market
else if(url.startsWith("market:")) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
this.cordova.getActivity().startActivity(intent);
} catch (android.content.ActivityNotFoundException e) {
LOG.e(TAG, "Error loading Google Play Store: " + url, e);
}
}
// All else
else {