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:
[login to view URL]
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: [login to view URL]
Should it be completed to perfection, bigger projects are ready to be worked on.
Hello! I can create app and use accelerometer.
==================================================
=========================================================