How to detect the stock Android browser

var navU = navigator.userAgent; // Android Mobile var isAndroidMobile = navU.indexOf(‘Android’) > -1 && navU.indexOf(‘Mozilla/5.0’) > -1 && navU.indexOf(‘AppleWebKit’) > -1; // Apple webkit var regExAppleWebKit = new RegExp(/AppleWebKit\/([\d.]+)/); var resultAppleWebKitRegEx = regExAppleWebKit.exec(navU); var appleWebKitVersion = (resultAppleWebKitRegEx === null ? null : parseFloat(regExAppleWebKit.exec(navU)[1])); // Chrome var regExChrome = new RegExp(/Chrome\/([\d.]+)/); var resultChromeRegEx = regExChrome.exec(navU); var …

Read more

Is there a kind of Firebug or JavaScript console debug for Android? [closed]

One option is weinre. It provides DOM & Style editing along with the console. If you don’t want to set it up yourself, there is an instance hosted at http://debug.phonegap.com The other option is JSHybugger. It’s certainly the most complete debugging environment available for android browser. It’s a paid product, but probably worth it.

WebView link click open default browser

I had to do the same thing today and I have found a very useful answer on StackOverflow that I want to share here in case someone else needs it. Source (from sven) webView.setWebViewClient(new WebViewClient(){ public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url != null && (url.startsWith(“http://”) || url.startsWith(“https://”))) { view.getContext().startActivity( new Intent(Intent.ACTION_VIEW, Uri.parse(url))); …

Read more

How can I open a URL in Android’s web browser from my application?

Try this: Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(“http://www.google.com”)); startActivity(browserIntent); That works fine for me. As for the missing “http://” I’d just do something like this: if (!url.startsWith(“http://”) && !url.startsWith(“https://”)) url = “http://” + url; I would also probably pre-populate your EditText that the user is typing a URL in with “http://”.