well im making an app and it needs to know on what its running. lets say i run it on an android phone. first is there somewhere on in phone that says "android"? i need things things like screen size and if it can get touch, supported file types, jsr`s installed. is there a way to get that info from a phone? or am i doomed to try and make the mother of all phone databases?
A:
If it's running on an android phone presumably you'll have written it for android already, so you'll already know. As you're talking about JSRs and tagged the question "java-me" I assume you actually mean Java ME, and have become confused about whether a Java ME app will just work on Android (it won't, unless you do something like this.
On Java ME, you can do all these things.
Screen size: create a Canvas and call getWidth()/getHeight()
Handset name: call System.getProperty("microedition.platform");
JSR support, try instantiating a class from the JSR by using Class.forName()
-- if it throws ClassNotFoundException
, the JSR is not supported.
funkybro
2010-10-14 08:50:40
well the point is to make a simple code that works on "every" phoneusing java 1.2 or 1.3 as far as i know its the lowest common denominator so it should work on most phones...
kalix
2010-10-14 18:06:21