cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muratsu <>
Subject [GitHub] cordova-plugin-device-motion pull request: CB-9339 Increase the de...
Date Mon, 13 Jul 2015 21:19:24 GMT
GitHub user muratsu opened a pull request:

    CB-9339 Increase the default sensor accuracy

    The current default SENSOR_STATUS_UNRELIABLE is having problems on sensors which fail
to report accuracy. 
    One such example is Nexus 7 (2013). 
    On Android 5.1.1 (api 22) onAccuracyChanged() method is not getting fired for sensor accuracy.
As a result the default accuracy is unchanged (SENSOR_STATUS_UNRELIABLE). Since we don't report
sensor data if accuracy is lower than medium, we don't report on this hw/sw combination.
    Stangely same code on same hw, works on earlier OS (Android 4.3 (api 18)). 
    It seems like there's a regression on OS sensor drivers but that's outside of our scope.

    With this change we will now report values for sensors which fail to report any accuracy
but some sensor data. In case a sensor fails to report any accuracy and reports bad sensor
data, I'm passing the responsibility to the end user to detect and ignore such data (since
I'm not able to detect it).
    Note that correctly working sensors will get filtered if they report SENSOR_STATUS_UNRELIABLE.
This fix will only affect sensors that fail to report any accuracy data at all.

You can merge this pull request into a Git repository by running:

    $ git pull CB-9339

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #32
commit b0f8e436efd7d0db586bc2165733ebe5467b8498
Author: Murat Sutunc <>
Date:   2015-07-13T21:05:37Z

    CB-9339 Increase the default sensor accuracy


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message