02-05-2013 05:17 AM
Hi there,
I have developed an android app using gingerbread.
I want to repackage and deploy it on blackberry. I did so and my app has some issues in blackberry.
So I want to remove some of the functionalities from my code if it is blackberry.
I can modify my code and recreate .apk and .bar respectively
I want some code like:
if(APP_IS_RUNNING_ON_BLACKBERRY)
{
// do this
}else{
//do that
}
How do I know if APP_IS_RUNNING_ON_BLACKBERRY??
Is there any way using android sdk to know if app is not running on android device but on blackberry?
Thanks in advance.
02-05-2013 11:29 AM
You can use the "os.name" system property which will return 'qnx' if the app is running on BlackBerry :
Boolean APP_IS_RUNNING_ON_BLACKBERRY;
APP_IS_RUNNING_ON_BLACKBERRY = System.getProperty("os.name").equals("qnx");
Jonathan