java.lang.Object | |
↳ | android.hardware.Sensor |
Class representing a sensor. Use getSensorList(int)
to get
the list of available Sensors.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | TYPE_ACCELEROMETER | A constant describing an accelerometer sensor type. | |||||||||
int | TYPE_ALL | A constant describing all sensor types. | |||||||||
int | TYPE_AMBIENT_TEMPERATURE | A constant describing an ambient temperature sensor type | |||||||||
int | TYPE_GRAVITY | A constant describing a gravity sensor type. | |||||||||
int | TYPE_GYROSCOPE | A constant describing a gyroscope sensor type | |||||||||
int | TYPE_LIGHT | A constant describing a light sensor type. | |||||||||
int | TYPE_LINEAR_ACCELERATION | A constant describing a linear acceleration sensor type. | |||||||||
int | TYPE_MAGNETIC_FIELD | A constant describing a magnetic field sensor type. | |||||||||
int | TYPE_ORIENTATION |
This constant was deprecated
in API level 8.
use SensorManager.getOrientation() instead.
|
|||||||||
int | TYPE_PRESSURE | A constant describing a pressure sensor type | |||||||||
int | TYPE_PROXIMITY | A constant describing a proximity sensor type. | |||||||||
int | TYPE_RELATIVE_HUMIDITY | A constant describing a relative humidity sensor type. | |||||||||
int | TYPE_ROTATION_VECTOR | A constant describing a rotation vector sensor type. | |||||||||
int | TYPE_TEMPERATURE |
This constant was deprecated
in API level 14.
use
Sensor.TYPE_AMBIENT_TEMPERATURE instead.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a string containing a concise, human-readable description of this
object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
A constant describing an accelerometer sensor type. See
SensorEvent.values
for more
details.
A constant describing all sensor types.
A constant describing an ambient temperature sensor type
A constant describing a gravity sensor type.
See SensorEvent
for more details.
A constant describing a gyroscope sensor type
A constant describing a light sensor type. See
SensorEvent.values
for more
details.
A constant describing a linear acceleration sensor type.
See SensorEvent
for more details.
A constant describing a magnetic field sensor type. See
SensorEvent.values
for more
details.
This constant was deprecated
in API level 8.
use SensorManager.getOrientation()
instead.
A constant describing an orientation sensor type. See
SensorEvent.values
for more
details.
A constant describing a pressure sensor type
A constant describing a proximity sensor type. See
SensorEvent.values
for more
details.
A constant describing a relative humidity sensor type.
See SensorEvent
for more details.
A constant describing a rotation vector sensor type.
See SensorEvent
for more details.
This constant was deprecated
in API level 14.
use
Sensor.TYPE_AMBIENT_TEMPERATURE
instead.
A constant describing a temperature sensor type
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.