Akanmu Sola
Akanmu Sola

Reputation: 83

Codename One - Identifying what OS app is running on

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

Answers (2)

Shai Almog
Shai Almog

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

BillRobertson42
BillRobertson42

Reputation: 12883

System.getProperty("os.name");

More here: http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html

Upvotes: 2

Related Questions