Try this javascript:
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
if(isAndroid) {
// Do something!
}
solved When someone opens my website made in wordpress on a mobile device, to offer an Android app