cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Coupée (JIRA) <j...@apache.org>
Subject [jira] [Updated] (CB-12604) Improve Android Frequency
Date Fri, 24 Mar 2017 20:24:41 GMT

     [ https://issues.apache.org/jira/browse/CB-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jon Coupée updated CB-12604:
----------------------------
    Description: 
Currently Android is set to SENSOR_DELAY_UI which is restricted to 16Hz. I think this can
be increased to SENSOR_DELAY_GAME which increases the frequency to 50Hz. I've created and
tested a fork on a Samsung S4 and S6, and the devices both report unique timestamps at this
speed. This increase in speed would improve usability of the plugin for gaming, and also scientific
data capture apps.

Increasing Android to SENSOR_DELAY_FASTEST would perhaps bring it inline with iOS - but I
appreciate there are an incredible range of devices beyond the Samsung devices.

I've also looked more closely at the docs iOS quirk and cannot see anything within the plugin
which restricts the iOS device to 40ms. I think I've also noticed that the iOS defaults to
100Hz.

"The API calls the success callback function at the interval requested, but restricts the
range of requests to the device between 40ms and 1000ms. For example, if you request an interval
of 3 seconds, (3000ms), the API requests data from the device every 1 second, but only executes
the success callback every 3 seconds."

  was:
Currently Android is set to SENSOR_DELAY_UI which is restricted to 16Hz. I think this can
be increased to SENSOR_DELAY_GAME which increase the frequency to 50Hz. I've created and tested
a fork on a Samsung S4 and S6, and the devices both report unique timestamps at this speed.
This increase in speed would improve usability of the plugin for gaming, and also scientific
data capture apps.

Increasing Android to SENSOR_DELAY_FASTEST would perhaps bring it inline with iOS - but I
appreciate there are an incredible range of devices beyond the Samsung devices.

I've also looked more closely at the docs iOS quirk and cannot see anything within the plugin
which restricts the iOS device to 40ms. I think I've also noticed that the iOS defaults to
100Hz.

"The API calls the success callback function at the interval requested, but restricts the
range of requests to the device between 40ms and 1000ms. For example, if you request an interval
of 3 seconds, (3000ms), the API requests data from the device every 1 second, but only executes
the success callback every 3 seconds."


> Improve Android Frequency 
> --------------------------
>
>                 Key: CB-12604
>                 URL: https://issues.apache.org/jira/browse/CB-12604
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin Device Motion
>            Reporter: Jon Coupée
>            Priority: Minor
>              Labels: performance
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> Currently Android is set to SENSOR_DELAY_UI which is restricted to 16Hz. I think this
can be increased to SENSOR_DELAY_GAME which increases the frequency to 50Hz. I've created
and tested a fork on a Samsung S4 and S6, and the devices both report unique timestamps at
this speed. This increase in speed would improve usability of the plugin for gaming, and also
scientific data capture apps.
> Increasing Android to SENSOR_DELAY_FASTEST would perhaps bring it inline with iOS - but
I appreciate there are an incredible range of devices beyond the Samsung devices.
> I've also looked more closely at the docs iOS quirk and cannot see anything within the
plugin which restricts the iOS device to 40ms. I think I've also noticed that the iOS defaults
to 100Hz.
> "The API calls the success callback function at the interval requested, but restricts
the range of requests to the device between 40ms and 1000ms. For example, if you request an
interval of 3 seconds, (3000ms), the API requests data from the device every 1 second, but
only executes the success callback every 3 seconds."



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message