Doing a phone call in LWUIT

前端 未结 2 1463
天命终不由人
天命终不由人 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
    

提交回复
热议问题