|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.system.AccelerometerChannelConfig
Accelerometer channel configuration. Contains data type, application running mode and raw samples count to keep in buffer.
| Field Summary | ||
static int |
TYPE_ORIENTATION
Channel type for orientation values. |
|
static int |
TYPE_RAW
Channel type for raw acceleration values. |
|
| Constructor Summary | ||
AccelerometerChannelConfig(int types)
Creates channel configuration for given data types. |
||
AccelerometerChannelConfig(int types,
boolean foregroundMode,
boolean backgroundMode,
int samplesCount)
Creates channel configuration based on data types, application running mode and raw samples count. |
||
| Method Summary | ||
int |
getSamplesCount()
Returns number of raw samples to store in channel buffer |
|
int |
getTypes()
Returns channel types |
|
boolean |
isBackgroundMode()
Returns whether channel should be active for application in background mode |
|
boolean |
isForegroundMode()
Returns whether channel should be active for application in foreground mode |
|
void |
setBackgroundMode(boolean backgroundMode)
Sets whether channel should be active for application in background mode |
|
void |
setForegroundMode(boolean foregroundMode)
Sets whether channel should be active for application in foreground mode |
|
void |
setSamplesCount(int samplesCount)
Sets number of raw samples to keep in a buffer. |
|
void |
setTypes(int types)
Sets channel types |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int TYPE_ORIENTATION
public static final int TYPE_RAW
| Constructor Detail |
public AccelerometerChannelConfig(int types)
types - mask with type flags
public AccelerometerChannelConfig(int types,
boolean foregroundMode,
boolean backgroundMode,
int samplesCount)
throws IllegalArgumentException
If application needs data only when running in the foreground then it should specify false for background mode as it will turn off accelerometer sensor query routine when unnecessary.
types - a mask of TYPE_ORIENTATION and TYPE_RAW
values which specify required data typeforegroundMode - if true then the channel is active when application is in
foreground mode, if false then the sensor is not queried
to save powerbackgroundMode - if true then the channel is active when application is in
background mode, if false then the sensor is not queried
to save powersamplesCount - number of raw samples to keep in bufferIllegalArgumentException - if types is not one of the TYPE_RAW and TYPE_ORIENTATION| Method Detail |
public int getSamplesCount()
public boolean isBackgroundMode()
public boolean isForegroundMode()
public void setBackgroundMode(boolean backgroundMode)
backgroundMode - specifies new background modepublic void setForegroundMode(boolean foregroundMode)
foregroundMode - specifies new foreground modepublic void setSamplesCount(int samplesCount)
samplesCount - number of samples to keep in bufferpublic void setTypes(int types)
types - as mask
|
|||||||||
| 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.