I need a simple script written to quickly detect the presence of an accelerometer on mobile devices and redirect the visitor to a page based on the output.
The script needs to run smoothly across both IOS and Android, and all major browsers.
It appears to me that the DeviceOrientationEvent has the best mobile web browser compatibility for this project:
[url removed, login to view]
How I imagine it working:
On load --> detect orientation
Delay 100 milliseconds
Detect orientation again --> if same as original value, redirect to page URL "A" --> if different from original value, redirect to page URL "B"
Resources: [url removed, login to view]
Should it be completed to perfection, bigger projects are ready to be worked on.