|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.accessory.CradleProtocol
public class CradleProtocol
Provides the ability to communicate with a cradle and discover its type and properties.
| Field Summary | ||
|---|---|---|
static int |
PROPERTY_AC_CHARGING
Property flag specifying that the cradle has AC power charge capability. |
|
static int |
PROPERTY_BUTTONS_OTHER
Property flag specifying that the cradle has buttons for application use. |
|
static int |
PROPERTY_BUTTONS_PROXY
Property flag specifying that the cradle has buttons that will be automatically converted into BlackBerry device keystrokes. |
|
static int |
PROPERTY_LIGHT
Property flag specifying that the cradle has a light feature. |
|
static int |
PROPERTY_USB_PASSTHROUGH
Property flag specifying that the cradle has a USB passthrough feature. |
|
static int |
TYPE_AUDIO
Constant specifying that an audio cradle is connected. |
|
static int |
TYPE_BEDSIDE
Constant specifying that a bedside cradle is connected. |
|
static int |
TYPE_CAR_KIT
Constant specifying that a car kit cradle is connected. |
|
static int |
TYPE_CHARGER
Constant specifying that a charger cradle is connected. |
|
static int |
TYPE_DESKTOP
Constant specifying that a desktop cradle is connected. |
|
static int |
TYPE_HOLSTER
Constant specifying that a holster cradle is connected. |
|
static int |
TYPE_MULTIMEDIA
Constant specifying that a multimedia cradle is connected. |
|
static int |
TYPE_NONE
Constant specifying that no cradle is connected. |
|
static int |
TYPE_SIMPLE
Constant specifying that a simple cradle is connected. |
|
| Method Summary | ||
|---|---|---|
boolean |
communicationSupported()
Determines whether the connected cradle supports communication. |
|
int |
getCradleType()
Returns the type of the currently connected cradle. |
|
static CradleProtocol |
getInstance()
Returns a CradleProtocol singleton instance. |
|
boolean |
hasProperty(int prop)
Determines whether a connected cradle has a specified property. |
|
boolean |
isCradleConnected()
Determines whether a cradle is currently connected. |
|
boolean |
isCradleDetectionSupported()
Determines whether the device can detect a connected cradle accessory. |
|
boolean |
isNfcConnection()
Determines whether the cradle is connected through the Near Field Communication (NFC) radio protocol. |
|
boolean |
isUsbConnection()
Determines whether the cradle is connected through a USB connector. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_NONE
public static final int TYPE_SIMPLE
A simple cradle can be of any functional type. It is less expensive to manufacture than a "smart" cradle, which can report its type.
public static final int TYPE_HOLSTER
The holster cradle assumes that the user cannot interact with the BlackBerry device.
public static final int TYPE_CAR_KIT
public static final int TYPE_DESKTOP
public static final int TYPE_BEDSIDE
public static final int TYPE_CHARGER
public static final int TYPE_AUDIO
public static final int TYPE_MULTIMEDIA
public static final int PROPERTY_AC_CHARGING
public static final int PROPERTY_BUTTONS_OTHER
Unlike with CradleProtocol.PROPERTY_BUTTONS_PROXY, the buttons will not be automatically processed by the BlackBerry device.
An application would have to use its cradle communication protocol to read keystrokes.
public static final int PROPERTY_BUTTONS_PROXY
public static final int PROPERTY_LIGHT
public static final int PROPERTY_USB_PASSTHROUGH
| Method Detail |
|---|
public static CradleProtocol getInstance()
CradleProtocol singleton instance.
public int getCradleType()
public boolean isCradleDetectionSupported()
true if the device can detect a connected cradle, false otherwise.public boolean isCradleConnected()
true if connected, false otherwise.public boolean hasProperty(int prop)
prop - One of the PROPERTY_* constants in this class.
true if the device has the prop property, false otherwise.public boolean communicationSupported()
If a cradle supports communication, applications can send commands that are accessory-specific, such as TURN_LIGHT_ON.
true if the cradle supports communication, false otherwise.public boolean isUsbConnection()
true if connected through USB, false otherwise.public boolean isNfcConnection()
true if connected through NFC, false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal