Sensor¶
-
public class
Sensor
¶ Class representing a sensor. Mirror off the one in Android without the final keyword.
Fields¶
TYPE_ACCELEROMETER¶
-
public static final int
TYPE_ACCELEROMETER
¶ A constant describing an accelerometer sensor type.
TYPE_AMBIENT_TEMPERATURE¶
-
public static final int
TYPE_AMBIENT_TEMPERATURE
¶ A constant describing an ambient temperature sensor type.
TYPE_GYROSCOPE¶
-
public static final int
TYPE_GYROSCOPE
¶ A constant describing a gyroscope sensor type.
TYPE_MAGNETIC_FIELD¶
-
public static final int
TYPE_MAGNETIC_FIELD
¶ A constant describing a magnetic field sensor type.
Methods¶
getMaxDelay¶
-
public int
getMaxDelay
()¶ This value is defined only for continuous and on-change sensors. It is the delay between two sensor events corresponding to the lowest frequency that this sensor supports. When lower frequencies are requested through registerListener() the events will be generated at this frequency instead.
- Returns
The max delay for this sensor in microseconds.
getMaximumRange¶
-
public float
getMaximumRange
()¶ - Returns
The maximum range of the sensor in the sensor’s unit.
getMinDelay¶
-
public int
getMinDelay
()¶ - Returns
The minimum delay allowed between two events in microsecond or zero if this sensor only returns a value when the data it’s measuring changes.