Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Guide de dépannage Page 185

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 286
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 184
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).
Vue de la page 184
1 2 ... 180 181 182 183 184 185 186 187 188 189 190 ... 285 286

Commentaires sur ces manuels

Pas de commentaire