Interface Dialerlistener; Sample Dialerlistener Implementation - Motorola E680 - Smartphone - GSM Developer's Manual

Micro edition (j2me) applications
Hide thumbs Also See for E680 - Smartphone - GSM:
Table of Contents

Advertisement

17
Telephony API
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
}
}
Asynchronous callback for receive phone call event
public void notifyDialerEvent(Dialer dialer, byte event) {
switch (event) {
77
- if the call could not be end or cancel.
interface provides a mechanism for the application to be notified
notifyDialerEvent()
method is called

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the E680 - Smartphone - GSM and is the answer not in the manual?

Table of Contents