Troubleshooting guide

12
Using the phone application
Start the phone application from your application
To open the phone application from your application, invoke
Invoke.invokeApplication(APP_TYPE_PHONE,PhoneArguments).
The following excerpt from the Restaurants.java code sample on page 69 creates a menu item that invokes the
phone application to call a restaurant.
private MenuItem phoneItem = new MenuItem(_resources.getString(MENUITEM_PHONE), 110, 12) {
public void run() {
synchronized(store) {
String phoneNumber = phonefield.getText();
if ( phoneNumber.length == 0 ) {
Dialog.alert(_resources.getString(ALERT_NO_PHONENUMBER));
} else {
PhoneArguments call = new PhoneArguments(PhoneArguments.ARG_CALL, phoneNumber);
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, call);
}
}
}
};
Use phone call functionality
Start the phone application from your application
Use phone call functionality
Listen for phone events
Access and use call logs
Task Steps
Retrieve a phone call. >Invoke Phone.getActiveCall().
PhoneCall call = Phone.getActiveCall();
Retrieve a phone call by call ID. >Invoke Phone.getCall(int).