Skip to content

Update sensors handling and move evaluateJavascript to message queue#211

Merged
gdlbo merged 4 commits intomonogram-android:developfrom
SecondThundeR:fix/webapp_sensors
Apr 8, 2026
Merged

Update sensors handling and move evaluateJavascript to message queue#211
gdlbo merged 4 commits intomonogram-android:developfrom
SecondThundeR:fix/webapp_sensors

Conversation

@SecondThundeR
Copy link
Copy Markdown
Contributor

@SecondThundeR SecondThundeR commented Apr 7, 2026

  • Allow sending null instead of empty object when sending event to client
  • Add custom throttle when sending "changed" event for sensors to respect refresh rate parameter, because passing sampling period doesn't guarantee that it will send update for sensors at specified rate

    samplingPeriodUs - The rate sensor events are delivered at. This is only a hint to the system. Events may be received faster or slower than the specified rate. Usually events are received faster.

  • Wrap all evaluateJavascript calls to webapp.post to make them asynchronous
  • Refactor stopSensor function to accept 1 or many types as list and remove specific code for device orientation

@gdlbo gdlbo marked this pull request as draft April 7, 2026 19:49
@SecondThundeR
Copy link
Copy Markdown
Contributor Author

SecondThundeR commented Apr 7, 2026

  • Match sensor delay calculation with Telegram for Android
  • Match handling accelerometer values with Telegram for Android
  • Match handling device orientation sensors and logic with Telegram for Android
  • Add refresh rate value clamping between 20 and 1000 ms

@gdlbo gdlbo marked this pull request as ready for review April 7, 2026 22:02
@gdlbo gdlbo self-requested a review April 7, 2026 22:02
@gdlbo gdlbo merged commit eab7b5b into monogram-android:develop Apr 8, 2026
@SecondThundeR SecondThundeR deleted the fix/webapp_sensors branch April 8, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants