Before using the Location API we need to know whether the api is in the mobile or NOT.
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.*;
public class IdentifyLocationAPI extends MIDlet implements CommandListener {
private Display mDisplay;
private Alert alert;
public void startApp() {
mDisplay = Display.getDisplay(this);
//It will return the version number
String s=System.getProperty("microedition.location.version");
alert=new Alert("Information",s,null,null);
alert.setTimeout(Alert.FOREVER);
mDisplay.setCurrent(alert);
}
public void commandAction(Command c, Displayable s) {
}
public void pauseApp() {
}
public void destroyApp (boolean unconditional) {
}
}
No comments:
Post a Comment