3

Google, in Android KitKat (v.4.4.x), newly introduced TYPE_STEP_COUNTER and TYPE_STEP_DETECTOR and Batched sensor events.

Does anyone know if the newly introduced sensor is supported in all KitKat devices or only the new devices with specific hardware (e.g. Nexus 5, Moto X, etc)?Can we create a list with all supported devices? Can these new sensors be used in the Android v4.4 emulator if you feed mock sensory data?

glarkou
  • 7,023
  • 12
  • 68
  • 118
  • I would assume it would work in all devices, since I am pretty sure it works with the accelerometer an that is how the step detection works. I would also assume, however, that accuracy is likely device dependent. – zgc7009 Apr 16 '14 at 20:23
  • Are you sure about that? I found some posts around and the authors state that you need specific devices since it is hardware dependent. – glarkou Apr 16 '14 at 20:25
  • Nope, not sure, just making the assumption based off of the documentation stating that TYPE_STEP_DETECTOR determines steps based on acceleration changes (which as far as I know are only really detected by the accelerometer). – zgc7009 Apr 16 '14 at 20:26

1 Answers1

4

Not all KitKat devices will support these sensors from my understanding of the documentation:

Both step sensors are hardware dependent (Nexus 5 is the first device to support them), so you should check for availability with hasSystemFeature(), using the FEATURE_SENSOR_STEP_DETECTOR and FEATURE_SENSOR_STEP_COUNTER constants.

kabuko
  • 36,028
  • 10
  • 80
  • 93
  • Yes, I have read that. Do you know if you can use the emulator to test this newly introduced features? – glarkou Apr 16 '14 at 20:32
  • So is there a separate accelerometer sensor for steps? Or are step sensors more advanced versions of basic accelerometers? – zgc7009 Apr 16 '14 at 20:32
  • 1
    Yeah, the documentation is a little misleading.. it says accelerometer but definately seems device dependent. I have an HTC one, a Nexus 5, and a Nexus 7 and only the Nexus 5 shows it as an available sensor type. I am currently looking to see if there are any good ways of using the accelerometer in instances where the step detector is not available.. interesting post: http://stackoverflow.com/questions/20324356/how-to-calculate-exact-foot-step-count-using-accelerometer-in-android – erik Jun 23 '14 at 22:19
  • all the devices i mentioned above are all running kitkat – erik Jun 23 '14 at 22:27