Search code examples
java-melwuit

Make a call in Lwuit using textfield


Possible Duplicate:
Doing a phone call in LWUIT

I have created text field with phone number.How do i make a call when call button is clicked?


Solution

  • You can use following one for make a call from your application,

    String phoneNo = textfield.getText();
    Display.getInstance().execute("tel:" + phoneNo );
    

    (Or)

    If your TextField in MIDlet class, you can use like this.

    String phoneNo = textfield.getText();
    platformRequest("tel:" + phoneNo );
    

    Both are works fine.