Doing a phone call in LWUIT

前端 未结 2 1455
天命终不由人
天命终不由人 2021-01-22 20:02

I have a textfield with phone number. All I want to do is when the textfield is focused and call button is pressed, application must be paused and call should be made to the pho

相关标签:
2条回答
  • 2021-01-22 20:34

    Your main class should extends with MIDlet. So there is no issues. You can call like this,

    String telNo = "tel no";
    platformRequest(telNo );
    

    Suppose If you want to access outside of midlet, you can pass the midlet object to that class and call like this,

    String telNo = "tel no";
    midlet.platformRequest(telNo ); // midlet is MIdlet object name
    
    0 讨论(0)
  • 2021-01-22 20:48

    Also you can do without extend MIDlet using this:

    String telNo = "tel no";
    Display.getInstance().execute("tel:" + telNo);
    
    0 讨论(0)
提交回复
热议问题