Sensor.IsWakeUpSensor Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns true if the sensor is a wake-up sensor.
public virtual bool IsWakeUpSensor { [Android.Runtime.Register("isWakeUpSensor", "()Z", "GetIsWakeUpSensorHandler")] get; }
[<get: Android.Runtime.Register("isWakeUpSensor", "()Z", "GetIsWakeUpSensorHandler")>]
member this.IsWakeUpSensor : bool
Property Value
true
if this is a wake-up sensor, false
otherwise.
- Attributes
Remarks
Returns true if the sensor is a wake-up sensor.
<b>Application Processor Power modes</b>
Application Processor(AP), is the processor on which applications run. When no wake lock is held and the user is not interacting with the device, this processor can enter a “Suspend” mode, reducing the power consumption by 10 times or more.
<b>Non-wake-up sensors</b>
Non-wake-up sensors are sensors that do not wake the AP out of suspend to report data. While the AP is in suspend mode, the sensors continue to function and generate events, which are put in a hardware FIFO. The events in the FIFO are delivered to the application when the AP wakes up. If the FIFO was too small to store all events generated while the AP was in suspend mode, the older events are lost: the oldest data is dropped to accommodate the newer data. In the extreme case where the FIFO is non-existent maxFifoEventCount() == 0
, all events generated while the AP was in suspend mode are lost. Applications using non-wake-up sensors should usually: <ul> <li>Either unregister from the sensors when they do not need them, usually in the activity’s onPause
method. This is the most common case. <li>Or realize that the sensors are consuming some power while the AP is in suspend mode and that even then, some events might be lost. </ul>
<b>Wake-up sensors</b>
In opposition to non-wake-up sensors, wake-up sensors ensure that their data is delivered independently of the state of the AP. While the AP is awake, the wake-up sensors behave like non-wake-up-sensors. When the AP is asleep, wake-up sensors wake up the AP to deliver events. That is, the AP will wake up and the sensor will deliver the events before the maximum reporting latency is elapsed or the hardware FIFO gets full. See SensorManager#registerListener(SensorEventListener, Sensor, int, int)
for more details.
Java documentation for android.hardware.Sensor.isWakeUpSensor()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.