Skip to content

Samsung Galaxy S6 SM-G920T identified as tablet #73

Open

Description

@emmettbutler
In [1]: import user_agents
In [2]: agent = "Dalvik/2.1.0 (Linux; U; Android 6.0.1; SM-G920T Build/MMB29K)"
In [3]: parsed = user_agents.parse(agent)
In [4]: parsed.os
Out[4]: OperatingSystem(family='Android', version=(6, 0, 1), version_string='6.0.1')
In [5]: parsed.device
Out[5]: Device(family='Samsung SM-G920T', brand='Samsung', model='SM-G920T')
In [6]: parsed.browser
Out[6]: Browser(family='Android', version=(6, 0, 1), version_string='6.0.1')
In [7]: parsed.is_tablet
Out[7]: True
In [8]: parsed.is_mobile
Out[8]: False

The S6 should be identified as mobile instead of tablet. From my read of the code, it looks like _is_android_tablet could use some updates.

I discovered this while investigating this issue on Parse.ly's open source Android SDK.

Activity

  1. drlatech commented on Feb 10, 2017

    @drlatech

    There are also 2 more models which are shown as tablets.

    1. Samsung-SGH-I527, with this user agent
      Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; SAMSUNG-SGH-I527 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 FB_IAB/FB4A;FBAV/104.0.0.17.71;

    2. Samsung-SPH-L600
      Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; SPH-L600 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 FB_IAB/FB4A;FBAV/85.0.0.15.70;

    I debugged function parse in parsers, the problem is that there is no 'Mobile' in user agent, before Safari, so this automatically becomes tablet. I thought that this could be related with screen size and resolution. They are 6.3 inches.

  2. emmettbutler commented on Jun 12, 2017

    @emmettbutler
    ContributorAuthor

    Another user agent shown as a tablet that should parse as mobile:

    Dalvik/2.1.0 (Linux; U; Android 7.1.2; Nexus 6P Build/N2G47O)
    
  3. UdayVarkhedkar commented on Jun 14, 2017

    @UdayVarkhedkar

    Attached is a txt file of multiple mobile user agents that are incorrectly being parsed as tablets.
    Misclassified_Mobile_UserAgents.txt

  4. added a commit that references this issue on Jun 21, 2017
    71067f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions