Known Issue: Firefox on Android Phones

James M. sent us a note just before Christmas about a support issue affecting the Firefox browser on Android phones. Here is a quick overview of the issue.

Issue Summary: When using the Firefox browser on an Android mobile phone, the MobileESP code library erroneously reports the device as an Android tablet. An Android tablet is correctly identified as an Android tablet. This issue only affects mobile phones and similar small-screen Android devices like MP3 players (such as the Samsung Galaxy Player).

Root Cause: Mozilla uses the exact same useragent string for both phones and tablets. The string has the word “Android” in both. According to Google guidelines, Mozilla should include the word “mobile” in the useragent string for mobile phones. Unfortunately, Mozilla is not compliant with Google’s guidelines. The omission of the word “mobile” is the reason why phones are erroneously identified as tablets.

Work Around: MobileESP works by finding clues to the device type in the useragent string. Because Mozilla uses the same exact string when installed on both phones and tablets, MobileESP cannot recognize which type of device the browser is installed on. Here are some options:

    1. Don’t worry about it too much right now. Let’s hope Mozilla does the right thing and implements Google’s guidelines on the words to include in browser useragent strings on Android.
    2. Err on the side of mobile phones. Modify the code library to always return “true” for Android Phones and always return “false” for Android Tablets. You would do this by looking for the words “gecko” and “firefox” in the useragent string in each respective detection method. On the plus side, phone-optimized sites aren’t too awful on tablets. On the minus side, we aren’t fond of hacks like this, so we won’t officially add this hack to the MobileESP baseline.
    3. Write to Mozilla. Ask them to follow Google’s guidelines for useragent string construction. (We’re not sure if the best feedback forum is through the MDN or the mobile project forum. In the Android Market, Mozilla provides this email address for feedback:
We’re sorry that there is no fix to this issue at the present time within the MobileESP code base. It’s really up to Mozilla to fix this one themselves.

Owner of the MobileESP project. For the latest source code downloads, visit:

Posted in Code Updates, General