KitKat introduced sensor batching but I could not find a list of devices that support this. In particular I am interested whether the 2013 HTC One supports it.
Is there a (community maintained?) resource that lists the supported devices?
If sensor batching is not available on the HTC One, are there any good low-power gps tracking libraries? I would love to not have to write my own geofencing code (I assume this would be the most power-saving way to track the phone location)
Thanks
Android sensors are virtual devices that provide data coming from a set of physical sensors: accelerometers, gyroscopes, magnetometers, barometer, humidity, pressure, light, proximity and heart rate sensors.
What is batching? Batching refers to buffering sensor events in a sensor hub and/or hardware FIFO before reporting the events through the Sensors HAL. The location where sensor events are buffered (sensor hub and/or hardware FIFO) are referred to as "FIFO" on this page.
Stay organized with collections Save and categorize content based on your preferences. The Android platform provides two sensors that let you determine the position of a device: the geomagnetic field sensor and the accelerometer.
Using this code:
SensorManager mgr = (SensorManager) getSystemService(SENSOR_SERVICE);
Sensor accelerometer = mgr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
int fifoSize = accelerometer.getFifoReservedEventCount();
if (fifoSize > 0) {
//Device supports batched sensor updates
}
in an Activity that implemented a SensorEventListener. I found the following devices supported batched sensor updates:
and these did not:
Sorry :(. I will update with more devices when I get my hands on them
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With