Listen For Phone Events; Access And Use Call Logs - Blackberry JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE Integration Manual

Blackberry device applications integration guide
Table of Contents

Advertisement

Listen for phone events

Task
Listen for phone events.
Register the phone listener.
Remove a phone listener.
To act on a particular event, implement one of the following methods.
Event
A call is added to a conference call.
A BlackBerry® device user answers a call (user driven).
A conference call is established.
The network indicates a connected event (network driven).
A direct-connect call is connected.
A direct-connect call is disconnected.
A call is disconnected.
A BlackBerry device user ends the call.
A call fails.
A call goes on hold.
A new call arrives.
The BlackBerry device initiates an outgoing call.
A call is removed from a conference call.
A held call resumes.
A call is waiting.
A conference call is ended (all members are disconnected).

Access and use call logs

Task
Retrieve a phone log.
Retrieve the number of normal or missed
calls.
Retrieve a call log.
Steps
PhoneListener
>
Implement the
Phone.addPhoneListener().
>
Invoke
Invoke removePhoneListener().
>
Steps
PhoneLogs
The
class represents the phone call history and provides methods for opening, adding,
deleting, or swapping call logs.
PhoneLogs.getInstance()
>
Invoke
PhoneLogs _logs = PhoneLogs.getInstance();
There are two phone log folders: FOLDER_NORMAL_CALLS and FOLDER_MISSED_CALLS.
numberOfCalls(int).
>
Invoke
int numberOfCalls = _logs.numberOfCalls(FOLDER_NORMAL_CALLS);
You can instantiate two types of call logs:
ConferencePhoneCallLog
participant, and
PhoneLogs.callAt(int index, long folderID)
>
Invoke
PhoneCallLog phoneLog = (PhoneCallLog)_logs.callAt(0);
interface.
Method
callAdded(int)
callAnswered(int)
callConferenceCallEstablished(int)
callConnected(int)
callDirectConnectConnected(int)
callDirectConnectDisconnected(int)
callDisconnected(int)
callEndedByUser(int)
callFailed(int, int)
callHeld(int)
callIncoming(int)
callInitiated(int)
callRemoved(int)
callResumed(int)
callWaiting(int)
conferenceCallDisconnected(int)
.
PhoneCallLog
objects, which have only one
objects, which have two or more participants.
5: Listen for phone events
.
53

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment 4.6.0

Table of Contents