Endcall; Interface Dialerlistener; Sample Dialerlistener Implementation - Motorola C381P J2ME Technical Manual

J2me developer guide
Table of Contents

Advertisement

12
Telephony API

endCall

public void endCall()
end or cancel a phone call
Throws:
IOException

Interface DialerListener

public interface DialerListener
The
DialerListener
of phone call event.
When an event arrives, the
The listener mechanism allows applications to receive TAPI voice call event without
needing to have a listener thread
If multiple event arrive very closely together in time, the implementation has calling this
listener in serial.

Sample DialerListener Implementation

Dialer listener program
import java.io.IOException;
import javax.microedition.midlet.*;
import javax.microedition.io.*;
import com.motorola.*;
public class Example extends MIDlet implements DialerListener {
Dialer dialer;
// Initial tests setup and execution.
public void startApp() {
try {
dialer = Dialer.getDefaultDialer();
// Register a listener for inbound TAPI voice call events.
dialer.setDialerListener(this);
dialer.startCall("01065642288");
} catch (IOException e) {
// Handle startup errors
}
throws
IOException
- if the call could not be end or cancel.
interface provides a mechanism for the application to be notified
notifyDialerEvent()
method is called
59

Advertisement

Table of Contents
loading

Table of Contents