Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus 4 and Nexus 7 show Linux as platform rather than Android #27

Closed
Ultrabenosaurus opened this issue Jun 28, 2013 · 1 comment
Closed
Assignees
Labels

Comments

@Ultrabenosaurus
Copy link

Browscap v1.0; PHP v5.3.8

I'm using this for OS detection on the main download button in my current project, but both my Nexus 4 and Nexus 7 are being determined to be plain Linux instead of Android. Here is the output of getBrowser() through Chrome:-

stdClass Object
(
    [browser_name] => Mozilla/5.0 (Linux; Android 4.2.2; Nexus 4 Build/JDQ39E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.90 Mobile Safari/537.36
    [browser_name_regex] => ^mozilla/5\.0 \(.*linux.*\) applewebkit/.* \(khtml, like gecko\) .*safari/.*$
    [browser_name_pattern] => Mozilla/5.0 (*Linux*) AppleWebKit/* (KHTML, like Gecko) *Safari/*
    [Parent] => Safari Generic
    [Platform] => Linux
    [Comment] => Safari Generic
    [Browser] => Safari
    [Frames] => 1
    [IFrames] => 1
    [Tables] => 1
    [Cookies] => 1
    [JavaScript] => 1
    [JavaApplets] => 1
    [CssVersion] => 1
    [Version] => 0.0
    [MajorVer] => 0
    [MinorVer] => 0
    [Platform_Version] => unknown
    [Alpha] => 
    [Beta] => 
    [Win16] => 
    [Win32] => 
    [Win64] => 
    [BackgroundSounds] => 
    [VBScript] => 
    [ActiveXControls] => 
    [isMobileDevice] => 
    [isSyndicationReader] => 
    [Crawler] => 
    [AolVersion] => 0
)

Output of getBrowser() through stock Browser :-

stdClass Object
(
    [browser_name] => Mozilla/5.0 (Linux; U; Android 4.2.2; en-gb; Nexus 4 Build/JDQ39E) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 CyanogenMod/10.1.0/mako
    [browser_name_regex] => ^mozilla/5\.0 \(.*linux.*\) applewebkit/.* \(khtml, like gecko\) .*version/4\..* safari/.*$
    [browser_name_pattern] => Mozilla/5.0 (*Linux*) AppleWebKit/* (KHTML, like Gecko) *Version/4.* Safari/*
    [Parent] => Safari 4.0
    [Platform] => Linux
    [Comment] => Safari 4.0
    [Browser] => Safari
    [Version] => 4.0
    [MajorVer] => 4
    [MinorVer] => 0
    [Frames] => 1
    [IFrames] => 1
    [Tables] => 1
    [Cookies] => 1
    [JavaScript] => 1
    [JavaApplets] => 1
    [CssVersion] => 3
    [Platform_Version] => unknown
    [Alpha] => 
    [Beta] => 
    [Win16] => 
    [Win32] => 
    [Win64] => 
    [BackgroundSounds] => 
    [VBScript] => 
    [ActiveXControls] => 
    [isMobileDevice] => 
    [isSyndicationReader] => 
    [Crawler] => 
    [AolVersion] => 0
)
@quentin389
Copy link
Collaborator

This is a problem with browscap.ini list of user agents. Can't be fixed on our side. I've added a bug report to the browscap project.

@ghost ghost assigned quentin389 Aug 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants