|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Accessory
Represents an accessory.
An accessory can be anything that is connected physically or wirelessly to the device. An accessory has several properties that define it:
TYPE_* fields show predefined types,
but there may be other types that do not exist in this set.Accessory.getUniqueId().Accessory.getUrl()AccessoryManager.registerApplication.
See Accessory.getApplicationId().Accessory.getProperty(int).
These properties can be handled in an application and accessory specific way.
| Field Summary | ||
|---|---|---|
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 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 a "simple" accessory that can't specify its type. |
|
| Method Summary | ||
|---|---|---|
int |
getAccessoryType()
Returns one of the TYPE_* constants. |
|
String |
getApplicationId()
The application ID identifies an application on the device that this accessory is related to. |
|
byte[] |
getProperty(int key)
Returns data corresponding to the given property key. |
|
IntEnumeration |
getPropertyKeys()
Returns an enumeration to the property keys. |
|
String |
getUniqueId()
An accessory's unique id. |
|
URI |
getUrl()
Returns a URL associated with the accessory. |
|
boolean |
hasUSBPassThrough()
Returns true if the accessory has USB Passthrough. |
|
boolean |
isSelfPowered()
Returns true if the accessory can provide external AC power. |
|
NDEFMessage |
toNDEFMessage()
Converts the accessory to an NDEF message. |
|
| Field Detail |
|---|
static final int TYPE_NONE
static final int TYPE_SIMPLE
A simple accessory can be of any functional type and is less expensive to manufacture.
static final int TYPE_CHARGER
This can be any general charger that does not specify a specific type. This includes "simple" cradles, USB-ID devices that specify a "charger" type, and any charger that does not have USB-ID or NFC.
static final int TYPE_HOLSTER
The holster cradle assumes that the user cannot interact with the BlackBerry device.
static final int TYPE_CAR_KIT
static final int TYPE_DESKTOP
static final int TYPE_BEDSIDE
static final int TYPE_AUDIO
static final int TYPE_MULTIMEDIA
| Method Detail |
|---|
String getUniqueId()
int getAccessoryType()
TYPE_* constants.
URI getUrl()
String getApplicationId()
AccessoryManager.registerApplication(String, net.rim.device.api.system.ApplicationDescriptor).
AccessoryManager.registerApplication(String, net.rim.device.api.system.ApplicationDescriptor)
NDEFMessage toNDEFMessage()
throws IOException
IOException - if converting this accessory fails.byte[] getProperty(int key)
These properties do not contain Accessory Protocol properties such as class, type, transport capability etc. Use the accessor methods to retrieve those properties.
key - a property key.
IntEnumeration getPropertyKeys()
Accessory.getProperty(int)boolean isSelfPowered()
Power could come via USB or charging contacts.
#hasUSBPassThrough()}boolean hasUSBPassThrough()
This means the USB connection may provide power at USB or AC rate.
|
|||||||||
| 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