plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[plugin][sensors_plus] Need to specify sensor delay level.

Open windows7lake opened this issue 2 years ago • 4 comments

Use case

In my case, I need to specify sensor delay level.

sensorManager.registerListener(sensorEventListener, sensor, sensorManager.SENSOR_DELAY_NORMAL);

Proposal

sensorManager.SENSOR_DELAY_GAME is also needed.

windows7lake avatar Sep 01 '21 07:09 windows7lake

Considering that:

  1. iOS uses deviceMotionUpdateInterval to set a time unit.
  2. Android uses abstract delay level values (SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI, SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST) that seem to actually be tied to a maximum delay between two updates (https://developer.android.com/guide/topics/sensors/sensors_overview).

A generic interface to cover all platforms could take a maximum desired updated delay (in milliseconds) as a parameter and have predefined constants corresponding to the Android delays.

Would you be willing to accept a pull request that adds support for a maximum desired sensor update delay?

ghermana avatar Apr 11 '22 21:04 ghermana

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Jun 11 '22 00:06 github-actions[bot]

Is there any update on this?

zzzaJ avatar Jul 16 '22 19:07 zzzaJ

The sensorManager.SENSOR_DELAY_GAME would be cool to have

pierremrtn avatar Aug 19 '22 12:08 pierremrtn

Hi, are you open to contributions regarding this issue? I would like to contribute if possible.

harshitmahapatra avatar Jul 05 '23 10:07 harshitmahapatra