1

Is there a way to check if the user is shaking his/her mobile device using only html5 (no Javascript) in a web-app?

Edit: Sorry for adding Javascript in the question. I want to know if it's possible only by HTML5?

Abhishek
  • 3,900
  • 21
  • 42
  • Related: [http://stackoverflow.com/questions/4474508/access-accelerometer-via-javascript-in-android](http://stackoverflow.com/questions/4474508/access-accelerometer-via-javascript-in-android) – Mostafa Oct 02 '15 at 05:28
  • 2
    @royhowie I have to disagree with the duplicate vote here - that question asks how to get accelerometer data, whereas this question asks specifically how to use accelerometer data to determine when the user is shaking the device. – Maximillian Laumeister Oct 02 '15 at 05:43
  • 1
    @MaximillianLaumeister So do I. – OddDev Oct 02 '15 at 05:59
  • Duplicate? Please give the link if it's duplicate and please read the edited question. – Abhishek Oct 02 '15 at 05:59
  • To answer your edited question, accelerometer data cannot be accessed via HTML alone, only through JavaScript. If you cannot accept a solution that uses JavaScript, then unfortunately there is no solution to your problem. – Maximillian Laumeister Oct 02 '15 at 06:05
  • 1
    @MaximillianLaumeister Still, there is a difference between "how to detect a shake" and "how to access the accelerometer data". – OddDev Oct 02 '15 at 06:12

0 Answers0