Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What devices support Android Sensor Batching?

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

like image 660
mmlac Avatar asked Apr 19 '14 05:04

mmlac


People also ask

Which sensor is used in Android based devices?

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 sensor batching?

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.

How many types of sensors are available in Android to get the position of the device?

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.


1 Answers

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:

  1. Nexus 5 running Android 4.4.4
  2. Nexus 6 running Android 5.0.1
  3. Samsung Galaxy S5 (G900F Europe variant) running Android 5.0
  4. Samsung Galaxy Note 3 (SM-N9005) running Android 4.4.2
  5. Samsung Galaxy Note 4 (SM-N910F) running Android 4.4.4
  6. Nexus 5X running Android 6.0
  7. Nexus 6P running Android 7.0
  8. Google Pixel running Android 7.1
  9. Samsung Galaxy S7 Edge (SM-G935F) running Android 6.0.1
  10. Samsung Galaxy S7 (SM-G930F) running Android 6.0.1
  11. Sony Xperia XZ running Android 6.0.1
  12. Oneplus 3T running Android 6.0.1
  13. Samsung Galaxy S8 (SM-G950F) running Android 7.0
  14. LG G6 (LG-H870) running Android 7.0
  15. Sony Xperia XZ Premium (G8141) running Android 7.1.1
  16. Oneplus 5 running Android 7.1.1
  17. Google Pixel 2 running Android 8.0

and these did not:

  1. Moto G 1st gen 4G (XT1039) running Android 4.4.4
  2. HTC One M8 running Android 5.0.1
  3. Nexus 9 running Android 5.0.1
  4. Nvidia Shield Tablet running Android 5.0.1
  5. Nexus 4 running Android 5.0.1
  6. Sony Xperia Z running Android 4.4.2
  7. Sony Xperia Z3 compact running Android 5.0.2
  8. One Plus Two running Android 5.1.1
  9. LG G5 SE (LG-H840) running Android 6.0.1
  10. Amazon Kindle Fire 7 (7th gen) running Android 5.1.1

Sorry :(. I will update with more devices when I get my hands on them

like image 186
Mark Avatar answered Sep 25 '22 08:09

Mark