|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.system.Sensor
API's to determine the existence and states of device sensors.
| Field Summary | ||
static int |
FLIP
Sensor ID of the flip sensor. |
|
static int |
HOLSTER
Sensor ID of the holster sensor. |
|
static int |
STATE_FLIP_CLOSED
A state of the flip sensor that indicates the BlackBerry device flip is closed. |
|
static int |
STATE_FLIP_OPEN
A state of the flip sensor that indicates the BlackBerry device flip is open. |
|
static int |
STATE_IN_HOLSTER
A state of the holster sensor that indicates the BlackBerry device is in the holster. |
|
static int |
STATE_OUT_OF_HOLSTER
A state of the holster sensor that indicates the BlackBerry device is not in the holster. |
|
| Method Summary | ||
static void |
addListener(Application app,
SensorListener listener,
int sensors)
Adds a listener that listens for changes to the state of device sensors. |
|
static int |
getState(int sensorId)
Return the last known state of a sensor. |
|
static boolean |
isSupported(int sensorId)
Determines if the BlackBerry device supports a specific sensor. |
|
static void |
removeListener(Application app,
SensorListener listener)
Removes a listener from the provided application's list of listeners. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int FLIP
public static final int HOLSTER
public static final int STATE_FLIP_CLOSED
public static final int STATE_FLIP_OPEN
public static final int STATE_IN_HOLSTER
public static final int STATE_OUT_OF_HOLSTER
| Method Detail |
public static void addListener(Application app, SensorListener listener, int sensors)
app - The application that processes the listener notifications.listener - An instance of SensorListener to receive changes to the state of device sensors.sensors - A bitwise OR of sensor ID's.NullPointerException - If listener or app is null.public static int getState(int sensorId)
sensorId - The ID of sensorIllegalArgumentException - If sensorId does not represent a supported sensorpublic static boolean isSupported(int sensorId)
sensorId - The ID of a sensor to query.public static void removeListener(Application app, SensorListener listener)
listener is null or is not on the provided
application's list of listeners, then this method does nothing.app - The application that registered this listener.listener - An instance of SensorListener to stop receiving changes to the state of device sensors.NullPointerException - if app is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.