Redirect a different document ONLY to Android/Chrome Mobile phones

You would use this code:

var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
if(isAndroid) {
  // Do something!
  // Redirect to Android-site?
  window.location = 'http://android.davidwalsh.name';
}

This is from the following stack overflow thread:

Could you share your document with us? (Feel free to private message me). Would like to see what is not working smoothly. What device are you testing on?