From 98b971b4dec0df8315a0ec6513146c46ce6dbb4a Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Tue, 18 Jun 2013 16:19:27 -0700 Subject: [PATCH] CB-3902: Explicitly add market URIs to CordovaWebViewClient so this always works, not just sometimes --- .../src/org/apache/cordova/CordovaWebViewClient.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/framework/src/org/apache/cordova/CordovaWebViewClient.java b/framework/src/org/apache/cordova/CordovaWebViewClient.java index eef961c3..c49611e6 100755 --- a/framework/src/org/apache/cordova/CordovaWebViewClient.java +++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java @@ -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 {