怪我咯2017-04-17 12:05:40
deviceorientation You can get the x, y, z axes of the device running in space
devicemotion You can get the gravitational acceleration triggered by the device
The next step is calculation
You can do a data monitoring to obtain the values of the two APIs, and then the tester shakes it repeatedly to find the pattern.
General idea: acceleration peak + x or y axis peak?