Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12604

Improve Android Frequency

    XMLWordPrintableJSON

Details

    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 (25Hz). 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."

      Attachments

        Activity

          People

            Unassigned Unassigned
            bayhall-digital Jon Coupée
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified