0 Replies Latest reply on May 3, 2017 10:18 AM by jadams602

    DeviceRotation feedback in AIR 26 beta

    jadams602 Level 3

      Some feedback on the new DeviceRotation feature in AIR 26 beta (tested with 26.0.0.93 in particular)

       

      Comments:

      Do you plan on exposing an option to control the delay/rate at which DeviceRotationEvent.UPDATE events are delivered?

       

      With a quick simple test, seeing the following average rates of DeviceRotationEvent.UPDATE callbacks using its reported timestamps):

      Nexus 7  ~ every 125 milliseconds

      iOS iPhone 6 - every 90 milliseconds

       

      But at least on Android natively, you get to control the delay with SensorManager's SENSOR_DELAY_FASTEST, _GAME, _NORMAL, _UI

       

      Using Distriqt's existing third-party ANE https://github.com/distriqt/ANE-DeviceMotion

      and its exposure to a corresponding SensorRate property, I am able to get rates up to ~ 10 - 20 ms on the devices above with SensorRate.SENSOR_DELAY_FASTEST (even on iOS)

       

      Considering a vast majority of AIR apps that might want to use this feature are games, it might make sense for you to at least expose an optional GAME mode rate that can match ~ 20ms - 50ms on games.

       

      Issues:

      Testing with a Samsung Galaxy S III SGH-T999 running Android 4.4.4 , DeviceRotation.isSupported returns true but no DeviceRotationEvent.UPDATE events are received (same simple app code used to successfully get events on a Nexus 7 and iOS iPhone 6 above)