04-24-2013 12:40 AM
If you were to read this post, you'd think that 'BB10' is the user agent for detecting BB10. However, after testing this out on the BB10 simulators from 10.0.10.672 to 10.1.0.1483 I found that it's not the case but 'BlackBerry10' instead, I also deployed on a bb10 device and it had the same user agent. Is this post outdated?
Solved! Go to Solution.
04-24-2013 09:04 AM
BB10 Should be in the user agent header. I tested this morning on a device and it indeed was. I'm not sure about the simulator. Here is what I saw:
Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.0......
You can also see the code that BBUI uses for detection which has changed. It uses the BB10 property as well.
Hope that helps!
04-24-2013 10:56 AM
Z10 ST 100-1 - 10.0.9.2372
"Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+
Dev Alpha C - 10.1.0.1483
Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.1485 Mobile Safari/537.10+
04-24-2013 11:51 AM
This is indeed strange, one thing I forgot to mention that could potentially be an issue, is that I was debugging a webworks app on the simulator when I spotted this inconsistency. I was trying to find out why the framework wasn't applying BB10 styling to elements and it was that 'navigator.userAgent' was returning 'BlackBerry10'. I have a screenshot if that helps, see.
04-24-2013 12:35 PM
Can I suggest that you get the latest Sim?
It really depends on which version you're using as to what you'll get back
I must admit I've not tested this but try the current download and you should get something very close to delivery
I know my Dev Alpha reacts in very much the same way
If you want to identify a specific model of device search for Advertizing in the box above - this will lead you to a github extension we've been mustally discussing for the last few weeks that can tell you what you need to know
04-24-2013 01:03 PM
04-24-2013 01:31 PM
Sorry for that - you want to look at something more advanced...
Read the instructions
This, allied with other APIs lets you identify a device properly