Reputation: 83
Is there a way to check within my codes what Os a codename one app is running on, whether its Blackberry, Android, iOS, Windows, Symbian, etc...?
Upvotes: 3
Views: 576
Reputation: 52760
Generally if you want to do that you are probably doing something wrong and should backtrack and rethink "why" you want to do that. There are far better options to get platform specific functionality such as themes, override, native code etc.
You can get this information using Display.getInstance().getPlatformName()
.
Upvotes: 7
Reputation: 12883
System.getProperty("os.name");
More here: http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
Upvotes: 2