how to detect shake event?

  

.

I want to add some function in my APP, when user shake the mobile phone, the APP will do something,
but the problem is, how can I know the user is shaking the mobile? how to detect shake event?

.

Comments are closed.