Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check if the browser user agent is the stock android browser.
// Stock Android Browser Check >>>>>>>>>>>>>>>>
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1 && ua.indexOf("mobile") && ua.indexOf("chrome")==-1
if(isAndroid) {
// stuff
}
@Jarzka

This comment has been minimized.

Copy link

@Jarzka Jarzka commented Nov 28, 2016

Does not work. At least on Samsung GS4 the stock browser also includes Chrome in the user agent string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment