Interface to Sensor APIs (DeviceMotionEvent, DeviceOrientationEvent) Of note, there is an actual "Sensor API" which I explored and looks robust but is not supported/available on my Pixel7 or IphoneXR (June 2023) Thus I am not sure what the status of it is. Instead, the DeviceMotionEvent and DeviceOrientationEvent are working on both. You can access the mobile devices accelerometer, orientation, ambient light sensor, etc and use the data stream in your custom app

The DeviceMotion and DeviceOrientation apis are simply used by window event listeners
Thus for the architecture of this package we will listen to the events and then allow other agents to subscribe to this package to receive the forwarded results. This architecture has several benefits, including ensuring that only one listener is registered and that any transformation or edits on top of the listener can be consolidated before distribution to any subscribing clients of the api

Index

Variables

Functions