I am currently testing this marvellous jQuery plugin: SHAKE.JS.
It can detect accelerometer events such as SHAKING and trigger some action when it happens.
It will work on mobile only, so don’t try to shake your monitor!!
So, how can we test it? I made a Demo Page in bootstrap (fast prototyping), so please click on the button below by your mobile device and shake it. Then you can leave here a message with your Device Model, the OS version and browser you used for the test. I am collecting user’ tests for the compatibility table I started to populate. You can find this table on the DEMO page too.
How does it work? The script (author is Alex Gibson) simply detects if browser supports “ondevicemotion” API on window scope. If yes, it uses its events to trigger a function when paramethers such as velocity and timeout between events are upper than the controlled threshold. Very cool. So, please try my demo on your mobile and leave here a message with the result.
|Samsung Galaxy S5||Android 5.0||Chrome and System Browser||OK|
|Samsung Galaxy S3 NEO||Android 4.4.2||Chrome and System Browser||OK|
|Google Nexus 5||Android 5.1||Chrome and System Browser||OK|
|iPad 2||iOS 8.1.2||Safari||OK|
|iPhone 4||iOS 7.1.2||Safari||OK|
|iPhone 5||iOS 8.3||Safari||OK|
|iPhone 5s||iOS 8.3||Safari, Chrome, Dolphin||OK|