mmlac mmlac - 1 year ago 144
Android Question

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)


Answer Source

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

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

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download