I ported my android app to bb10 and it works quite well. However there are a couple of features I should turn off because they require the Google Play store. When I had a similar problem with the Amazon Kindle Fire I dealt with it by checking android.os.Build.MODEL and blacklisting Kindle devices. Is the right approach to take on BB10 and if so what are the model strings for current and future devices? Or is their a better way of dealing with this?
Asked
Active
Viewed 1,759 times
2 Answers
8
You can use the System.getProperty method to detect if your Android application is running on a BlackBerry PlayBook tablet, or BlackBerry 10 device.
System.getProperty(“os.name”);
On a BlackBerry device, this returns "qnx".
2
We use this function to detect if our android app is running on Blackberry Device (BB10, Playbook), Kindle Fire or Android device::
/**
* @return platform id
* 1 Android
* 2 Amazon
* 3 Blackberry
*/
public static int getPlatform(){
if(android.os.Build.BRAND.toLowerCase().contains("blackberry")){
return 3;
}else if(android.os.Build.MODEL.toLowerCase().contains("kindle")){
return 2;
}else{
return 1;
}
}

Jorgesys
- 124,308
- 23
- 334
- 268
-
2This should be the correct answer. On BB q10, System.getProperty("os.name") does not return "qnx". – ynnadkrap Oct 14 '15 at 13:31