Is my Android app running on a Playbook/BB10 device?
Recently we were testing one of our Android apps on a Playbook and the BB10 Dev Alpha. We realized there were a few features we wanted to customize on these devices without forking our code base. Luckily we found a simple solution to check which platform our app is running on. Since the Playbook and BB10 are both based on the QNX platform, so we can simply reference the os.name property as follows:
System.getProperty("os.name").equals("qnx");
There we go, we just need to add a static method to a utility class so we can easily check if our app is running on a QNX device.
public class Consts { public static boolean isPlaybook() { return System.getProperty("os.name").equals("qnx"); } }
I am extremely impressed with your writing skills as smartly as with the format on your blog. Is this a paid subject or did you customize it your self? Anyway stay up the nice quality writing, it is rare to peer a great blog like this one nowadays..
Good website! I really love how it is easy on my eyes and the data are well written. I am wondering how I might be notified whenever a new post has been made. I’ve subscribed to your RSS feed which must do the trick! Have a nice day!