Detect Android Devices/Phone using jQuery

Android and iPhone/iPad development is pretty hot and very much in demand. Below small piece of code will be useful to detect android devices (i.e. Android Phones & Android tablets) using jQuery.


Related Post:
$(document).ready(function(){
  var isAndroid = navigator.userAgent.toLowerCase().indexOf("android");
  if(isAndroid > -1)
  {
      //It is an Android device. Redirect to Android Version.
  }      
});​
You can test this code by changing the user agent in your browser and set it to Android. There are many plugins/ extension available that allows to change User agent. Below is the link for various user agent switchers available with chrome and firefox.

Feel free to contact me for any help related to jQuery, I will gladly help you.
SHARE

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..