Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Reply
Trusted Contributor
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10
My Carrier: Mobilink

Device ID of different devices on Android Runtime

Guys this may be useful for somebody out there trying to keep one code base for Playbook, Z10, Q10 and Q5. I have done some experimentation on a Playbook, Dev Alpha B and Dev Alpha C and found following resutls:

 

I used following 3 variables to get information about the device mode, device brand and device name.

 

These three variables are:

 

android.os.Build.MODEL;
android.os.Build.BRAND;
android.os.Build.DEVICE;

 

Here are my results:

 

Blackberry Playbook -- OS 2.1.0.1526
android.os.Build.MODEL = BlackBerry Runtime for Android Apps

android.os.Build.BRAND = BlackBerry

android.os.Build.DEVICE = PlayBook

Dev Alpha B - OS 10.1.0.1485
android.os.Build.MODEL = Z10

android.os.Build.BRAND = BlackBerry

android.os.Build.DEVICE = Z10


Dev Alpha C - Official OS 10.1.0.809
android.os.Build.MODEL = Dev Alpha

android.os.Build.BRAND = BlackBerry

android.os.Build.DEVICE = Dev Alpha


Can somebody confirm what are the results on actual Z10, Q10 and Q5 or point me to some documentation that lists that?

 

Thanks

Get Speedometer on your phone. http://www.speedometer.mobi
Retired
Posts: 140
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: Device ID of different devices on Android Runtime

android.os.MODEL / android.os.DEVICE, from 10.1 going forward, should be identical (as you see).  Having model set to "BlackBerry Runtime for Android Apps" is kind of confusing Smiley Happy

 

Z10 will have "Z10", Q10 will have "Q10", Q5 will have "Q5", etc...

 

These values come from /pps/services/deviceproperties, specifically the "modelname" attribute.

 

Also of note, android.os.BOARD now comes from that same pps as well, specifically the "modelnumber" attribute.

Trusted Contributor
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10
My Carrier: Mobilink

Re: Device ID of different devices on Android Runtime

Thanks for the confirmation. It was really helpful.

 

Wish we could have Q5 on a DAC too Smiley Happy

Get Speedometer on your phone. http://www.speedometer.mobi