MobileESP: Updated & Live on GitHub!

Good news! The core MobileESP libraries have been updated with some long-overdue enhancements: PHP, JavaScript, Java, C#, C++ and Python. There are a few more useragent strings added to the testing spreadsheet, as well. Updates are now live on GitHub:

https://github.com/ahand/mobileesp

tl;dr

New support for: Windows Phone 10, Firefox OS, Ubuntu Mobile OS, Sailfish, Tizen TV, WebOS TV. Removed support for Opera Android Phone and Tablet. Updated DetectTierIphone(), DetectTierTablet(), DetectSmartphone(). Added additional features to the C# and Python libraries, catching them up to PHP.

New detection methods:

  • DetectWindowsPhone10()
  • DetectFirefoxOS(): Detects a mobile phone or tablet device (probably) running the Firefox OS. However, this is challenging. Firefox don’t differentiate between Firefox OS and their browser running on other mobile platforms.
  • DetectFirefoxOSPhone()
  • DetectFirefoxOSTablet()
  • DetectSailfish(): We found a useragent for phones but couldn’t find one for tablets.
  • DetectSailfishPhone()
  • DetectUbuntu()
  • DetectUbuntuPhone()
  • DetectUbuntuTablet()
  • DetectMeegoPhone(): For Meego phones.
  • DetectTizenTV(): For Samsung Tizen OS smart TVs.
  • DetectWebOSTV(): For LG and Panasonic smart TVs running WebOS.

Updated Methods:

  • DetectTierIphone(): Added support for Windows Phone 10, Sailfish, Ubuntu Mobile OS and Firefox OS.
  • DetectTierTablet(): Added support for Ubuntu Mobile OS and Firefox OS.
  • DetectSmartphone(): Added support for Meego phones.
  • DetectMeego(): Changed definition. Now, this means any device. Introduced DetectMeegoPhone() for phones in particular.
  • DetectAndroidPhone(): Removed the special check for the obsolete HTC Flyer tablet.
  • DetectAndroidTablet(): Removed the special check for the obsolete HTC Flyer tablet.
  • DetectWindowsPhone(): Updated to include Windows 10.

Removed Methods:

  • DetectOperaAndroidPhone(): Removed this function. Opera changed its useragent string strategy. This method was no longer reliable.
  • DetectOperaAndroidTablet(): Removed this function. Opera changed its useragent string strategy. This method was no longer reliable.

C# and Python in Particular

These libraries hadn’t seen any love in awhile, so they were caught up to PHP. New features included adding Windows Phone 8 and 10, BlackBerry BB10, Bada, and significant updates to the Tier iPhone and Tablet methods.

Live Tests

Test the updated libraries directly online:

Request for Help: Bug Checking

Anthony checked for bugs in the PHP and JavaScript libraries, but doesn’t have the environments set up to check in the other libraries: Java, C#, C++ and Python. There always seems to be a parens or quote misplaced… Can you help?

Python Question

We’ve been notified that the Python library doesn’t follow the Python community coding standards regarding method names in lower case with underscores separating elements rather than camel case. What do y’all think about this? Would it be better to conform to the Python standards or keep the method names consistent between libraries? Please let Anthony know.

 

Contact Anthony directly: anthony.hand@gmail.com

Owner of the MobileESP project. For the latest source code downloads, visit: https://github.com/ahand/mobileesp

Posted in Code Updates, MobileESP APIs, UserAgent Test Strings