How to access to device sensors?

Hi,
I’d like to use tablets and smartphones for controlling synths. I’d like to use available sensor data (accelero, gyros). Is there a way for doing that ?
Would it theoretically possible to do that embedding a java script inspired by this : https://developer.mozilla.org/en-US/docs/Web/API/Window/devicemotion_event ?
Thanks a lot

Considering the wide range of devices that are currently supported by OSC, the device motion implementation is simply too erratic to be properly maintained. It was there in v0 and was removed in v1. The only open source library that attempts to unify device motion support is not maintained anymore and until something fills the gap I don’t think it’s a good idea to bring that feature back.