Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Guia de Resolução de Problemas Página 185

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 286
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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).
Vista de página 184
1 2 ... 180 181 182 183 184 185 186 187 188 189 190 ... 285 286

Comentários a estes Manuais

Sem comentários