12
Telephony
API
60
}
Asynchronous callback for receive phone call event
public void notifyDialerEvent(Dialer dialer, byte event) {
switch (event) {
case DialerEvent.PHONE_VOICECALL_INIT:
// your process
break;
case DialerEvent.PHONE_VOICECALL_FAILURE:
// your process
break;
case DialerEvent.PHONE_VOICECALL_CONNECT:
// your process
break;
case DialerEvent.PHONE_VOICECALL_DISCONNECT:
// your process
break;
case DialerEvent.PHONE_VOICECALL_TIMEOUT:
// your process
break;
case DialerEvent.PHONE_VOICECALL_HOLD:
// your process
break;
case DialerEvent.PHONE_VOICECALL_UNHOLD:
// your process
break;
case DialerEvent.PHONE_VOICECALL_DTMF_FAILURE:
// your process
break;
}
}
// Required MIDlet method - release the connection and
// signal the reader thread to terminate.
public void pauseApp() {
try {
dialer.endCall();
} catch (IOException e) {
// Handle errors
}
}
// Required MIDlet method - shutdown.
// @param unconditional forced shutdown flag
public void destroyApp(boolean unconditional) {
try {
dialer.setDialerListener(null);
dialer.endCall();
} catch (IOException e) {
// Handle shutdown errors.
}
}
}
Code Sample 7 DialerListener Implementation
Содержание C381P J2ME
Страница 1: ...Technical Manual Version 01 00 Motorola C381p Handset J2ME Developer Guide ...
Страница 34: ...8 Network APIs 34 catch Exception ex hc i null Code Sample 3 HTTPS Connection ...
Страница 48: ...10 JSR 120 Wireless Messaging API 48 e toString Code Sample 5 JSR 120 Wireless Messaging API ...