code: public boolean detectMobileLong() {
  
          if (detectMobileQuick() || detectGameConsole()) {
              return true;
          }
  
          if (detectDangerHiptop() || detectMaemoTablet() || detectSonyMylo() || detectArchos()) {
              return true;
          }
  
          if ((userAgent.indexOf(devicePda) != -1) && (userAgent.indexOf(disUpdate) < 0)) //no index found
          {
              return true;
          }
  
          //Detect older phones from certain manufacturers and operators.
          if ((userAgent.indexOf(uplink) != -1)
              || (userAgent.indexOf(engineOpenWeb) != -1)
              || (userAgent.indexOf(manuSamsung1) != -1)
              || (userAgent.indexOf(manuSonyEricsson) != -1)
              || (userAgent.indexOf(manuericsson) != -1)
              || (userAgent.indexOf(svcDocomo) != -1)
              || (userAgent.indexOf(svcKddi) != -1)
              || (userAgent.indexOf(svcVodafone) != -1)) {
              return true;
          }
  
          return false;
      }
docs: The longer and more thorough way to detect for a mobile device.
  Will probably detect most feature phones,
  smartphone-class devices, Internet Tablets,
  Internet-enabled game consoles, etc.
  This ought to catch a lot of the more obscure and older devices, also --
  but no promises on thoroughness!
  @return detection of any mobile device using the more thorough method