Android Marshmallow adds ‘high fidelity sensor support’ flag for developers

BY GreenBot Staff

Published 4 Nov 2015

is empowering developers with new tools to better deal with wonky sensors, which have long been a sore spot of Android fragmentation.

According to the Android 6.0 Compatibility Definition Document, devices whose sensors are accurate to within very strict tolerances can set a new flag: roid.hardware.sensor.hifi_sensors. Devices whose accelerometer, gyroscope, compass, barometers, step detectors, etc. all deliver data with high accuracy broad range must set this flag. This is a boon for developers, who can look for a single value know it can rely on the sensor data being accurate (or at least, put up a warning message to users that their device might deliver a sub-par experience).

Currently, developers can look at various flags to determine if a device as a particular sensor or not, but they have no way of knowing if it delivers precise, low-latency data.

The Android compatibility document also lays out power requirements so hardware manufacturers can build in sensors that will work as intends. Devices don’t have to meet the new requirements, they’re entirely optional, but the existence of a stardized way to tell developers they can rely on sensor data being accurate fast will be a big help in cutting down one of the prominent pain points in Android fragmentation.

y this matters: One of the reasons certain apps appear first, or only, on iOS is because iones deliver very consistent sensor data from one model to the next. Android phones, in being so diverse, often give wildly different results. at’s more, developers can’t rely on the results being delivered in a timely, low-latency fashion. is making it easier, if optional, for developers to know if a device provides high-quality, reliable, fast sensor data. In time, you may start seeing applications that are especially sensor-dependent (like running trackers or motion-sensitive games) throw up a warning on devices that don’t set the roid.hardware.sensor.hifi_sensors flag.