public boolean detectWindowsMobile ( ) { if ( detectWindowsPhone ( ) ) { return false ; } // Most devices use 'Windows CE', but some report 'iemobile' // and some older ones report as 'PIE' for Pocket IE. // We also look for instances of HTC and Windows for many of their WinMo devices. if ( userAgent . indexOf ( deviceWinMob ) != - 1 || userAgent . indexOf ( deviceWinMob ) != - 1 || userAgent . indexOf ( deviceIeMob ) != - 1 || userAgent . indexOf ( enginePie ) != - 1 || ( userAgent . indexOf ( manuHtc ) != - 1 && userAgent . indexOf ( deviceWindows ) != - 1 ) || ( detectWapWml ( ) && userAgent . indexOf ( deviceWindows ) != - 1 ) ) { return true ; } // Test for Windows Mobile PPC but not old Macintosh PowerPC. if ( userAgent . indexOf ( devicePpc ) != - 1 && ! ( userAgent . indexOf ( deviceMacPpc ) != - 1 ) ) return true ; return false ; }
Detects if the current browser is a Windows Mobile device . Excludes Windows Phone 7 . x and 8 devices . Focuses on Windows Mobile 6 . xx and earlier .