Re: [sensors] Default sensor configuration

> Our team has implemented Generic Sensor API based sensors 
(AmbientLight, Accelerometer, Gyroscope and Magnetometer) in Chromium 
for all the supported platforms (Android, Windows, Chrome OS/Linux, 
Mac).
> 
> We can confirm that platform sensor APIs on Android, Windows, Chrome
 OS/Linux (IIO) accept polling frequency as an input parameter for any
 sensor type, whatever reporting mode it provides.

My understanding from reading the [Android 
API](https://source.android.com/devices/sensors/report-modes.html#on-change)
 was that the sampling period meant something very different for 
'on-change' reporting mode. Specifically, that "[the] 
sampling_period_ns parameter passed to the batch function is used to 
set the minimum time between consecutive events, meaning an event 
should not be generated until sampling_period_ns nanoseconds elapsed 
since the last event, even if the value changed since then."

So this is something completely different than poll frequency for, 
say, a gyroscope. It's a value that says: don't give me data more 
often than once every _n_ seconds.

Is there a way to set the actual polling frequency of the underlying 
hardware sensor for an `on-change` sensor on Android?

-- 
GitHub Notification of comment by tobie
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/126#issuecomment-256632571 using
 your GitHub account

Received on Thursday, 27 October 2016 12:54:47 UTC