Help Center
Local Navigation
- Integrating with BlackBerry Device Software applications
- Message list
- Attachments
- Calendar
- Contact list
- Task list
- Phone
- Making a call from a BlackBerry device application
- Make a call from a BlackBerry device application (single-line environment)
- Make a call from a BlackBerry device application (multi-line environment)
- Add DTMF tones to the send queue
- BlackBerry DTMF tones
- Listen for and handle phone events
- Listen for and handle multi-line events
- Retrieve call information by using call logs
- Retrieve a call participant
- Retrieve call information
- Retrieve the phone number of a BlackBerry device
- Retrieve a call by call ID
- Displaying content on a phone screen
- Display content on a phone screen
- BlackBerry Browser
- Menu items
- Glossary
- Provide feedback
- Document revision history
- Legal notice
BlackBerry Manuals & Help
>
Developer Documentation
>
Java Development Guides and API Reference
>
Development Guide
Integration - BlackBerry Java Application - 5.0
Display content on a phone screen
-
Import the required classes and interfaces.
import net.rim.blackberry.api.phone.*; import net.rim.blackberry.api.phone.phonegui.*;
-
Create a class that extends the
AbstractPhoneListener class.
class MyPhoneScreenAction extends AbstractPhoneListener { } -
Override
PhoneListener.callIncoming() and
PhoneListener.callWaiting(). For each method, add an
instance of the
PhoneScreen class, passing in the call ID and your
application identifier.
public void callIncoming(int callid) { PhoneScreen f = new PhoneScreen(callid, app); } public void callWaiting(int callid) { PhoneScreen f = new PhoneScreen(callid, app); } -
Invoke
PhoneScreen.addImage() when the application detects
a specified
callid.
f.addImage(_images[0]);
-
Invoke
PhoneScreen.sendDataToScreen() to display the
content in the
PhoneScreen object in the incoming and active phone
screens.
f.sendDataToScreen();
-
In the
MyPhoneScreenAction class, invoke
Phone.addPhoneListener() to register the class that
extends
AbstractPhoneListener as a
PhoneListener.
Phone.addPhoneListener(new MyPhoneScreenAction(this));
Next topic: BlackBerry Browser
Previous topic: Displaying content on a phone screen