Jitter detection in html5 mobile

I am currently creating a web application in html5 which should be able to detect when a user shakes his phone and shakes it quickly. I looked through, but cannot find examples of how I could implement this. I know that in html5 there is an accelerometer that can determine the orientation of the phone, but how does it determine the speed with which the user shakes it?

I also test this on my iPhone, although ideally I would like it to work on Android devices as well. Thoughts? Examples would also be good. Thank!

+5
source share
2 answers

.

DeviceOrientation iOS Android.

0

All Articles