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

Blackberry not recognized #13

Open
oliver opened this issue Jan 1, 2012 · 7 comments
Open

Blackberry not recognized #13

oliver opened this issue Jan 1, 2012 · 7 comments

Comments

@oliver
Copy link

oliver commented Jan 1, 2012

It would be neat if httpagentparser would detect BlackBerry browsers.

In some server logs I found the following UA strings containing BlackBerry:

"BlackBerry8310/4.5.0.174 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry8310/4.5.0.69 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/114"
"BlackBerry8520/4.6.1.314 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry8900/4.6.1.310 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/114"
"BlackBerry8900/5.0.0.1036 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry8900/5.0.0.681 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry9000/4.6.0.303 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/114"
"BlackBerry9000/5.0.0.1036 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry9300/5.0.0.794 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/114"
"BlackBerry9500/4.7.0.78 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry9500/5.0.0.841 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry9520/5.0.0.1077 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry9700/5.0.0.344 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/124"
"BlackBerry9700/5.0.0.442 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/612"
"BlackBerry9700/5.0.0.593 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/114"
"BlackBerry9700/5.0.0.593 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/114 Webwasher/6.8.7"
"BlackBerry9700/5.0.0.593 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/604"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) BlackBerry8700/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/100"
"Mozilla/5.0 (BlackBerry; U; BlackBerry 9700; de) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.448 Mobile Safari/534.8+"
"Mozilla/5.0 (BlackBerry; U; BlackBerry 9700; de) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.668 Mobile Safari/534.8+"
"Mozilla/5.0 (BlackBerry; U; BlackBerry 9700; es) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.344 Mobile Safari/534.8+"
"Mozilla/5.0 (BlackBerry; U; BlackBerry 9780; de) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.546 Mobile Safari/534.8+"
"Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; de) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.246 Mobile Safari/534.1+"
"Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; de) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.337 Mobile Safari/534.1+"

@shon
Copy link
Owner

shon commented Jan 4, 2012

Hi Oliver, if you could tell me what is expected return when we some of these agent strings to detect function I would soon add support.

@oliver
Copy link
Author

oliver commented Jan 4, 2012

Based on http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-detect-the-BlackBerry-Browser/ta-p/559862 and http://www.useragentstring.com/BlackBerry_id_17117.php maybe the results for the UA strings posted above could be like this:

  • the first batch of UA strings (with "Profile/MIDP") is from BlackBerryOS 4 and 5 (exact OS version can be extracted from the "BlackBerry8310/4.5.0.174" part); the second batch is from BlackBerryOS 6 and 7 (exact OS version can be extracted from the "Version/6.0.0.448" part)
  • so os.name should always be "BlackBerryOS", and os.version can be anything from 4.5.0.174 to 7.0.0.1
  • if the UA string contains "Profile/MIDP", this is apparently some RIM self-made browser on Java basis, so browser.name could be "BlackBerry", and browser.version could be left out (at most, the BlackBerryOS version could be used here again)
  • for other UA strings, browser.name could be "Safari" and browser.version left out (again, looks like there's no usable Safari version number directly available from the UA strings)

I think "dist" and "flavor" can be left empty for these UAs.

What do you think?

@srs81
Copy link
Contributor

srs81 commented Mar 29, 2012

I just submitted a pull request which I think addresses this. It does not get the version, but it detects Blackberry phones and tablet (Playbook) correctly.

@shon
Copy link
Owner

shon commented Apr 2, 2012

Thanks srs81. Do you think flavor "Playbook" is more appropriate? Specifically the last test. Further the string mentions "RIM Tablet OS 1.0.0".

@srs81
Copy link
Contributor

srs81 commented Apr 2, 2012

Hi, sure. The only problem with that is: in my specific tests, I often have a "higher level" categorization based on OS, and a lower level one based on the specfic type. That's why for Android, I have added the tablet and phone-specific checks. Is there a way to designate the Playbook as a "Playbook" distribution for the "Blackberry" OS?

@srs81
Copy link
Contributor

srs81 commented Sep 5, 2012

Hello, I believe this is fixed, and can be closed, yes? :)

@shon
Copy link
Owner

shon commented Sep 27, 2012

It does detect OS but does not detect version yet. Further it fails for "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) BlackBerry8700/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/100". Although this perhaps is a corner case.
So I think we should leave it open till above issues are addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants