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
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
Also you can do without extend MIDlet using this:
String telNo = "tel no";
Display.getInstance().execute("tel:" + telNo);