Listen for and handle phone events
You can configure your BlackBerry® device application to listen for and automatically handle various phone events by implementing the PhoneListener interface. The PhoneListener interface provides a set of callback methods that you can use to receive notification of phone events.
Import the required classes and interfaces.
- Create a class that implements the PhoneListener interface.
Register the class that implements
PhoneListener by invoking
- Handle incoming phone events by using the PhoneListener callback methods. For example, to receive notification that a call is disconnected, implement the notification in callDisconnected(int); to receive notification that a new call has arrived, implement the notification in callIncoming(int); and to receive notification that a call is waiting, implement the notification in callWaiting(int). For a complete list of PhoneListener callback methods, see the API reference for the BlackBerry® Java® Development Environment
To deregister the