You can do it by using the method platformRequest().
public class PhoneCall extends MIDlet {
public void startApp() {
System.out.println("will call now");
boolean possible = false;
try {
possible = this.platformRequest("tel:01911008019");
} catch (Exception e) {
Alert alert = new Alert(e.getMessage());
Display.getDisplay(this).setCurrent(alert, Display.getDisplay(this).getCurrent());
}
Alert alert = new Alert("it's " + possible);
Display.getDisplay(this).setCurrent(alert, Display.getDisplay(this).getCurrent());
}
protected void pauseApp() {
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
}
}
No comments:
Post a Comment