detect Shake in android
问题 I am trying to hit an API when user shake a device 10 times. I have tried many git sample and stack overflow solution but non of them did solve my problem. Some of them detecting shake before 10 times or after 10 times. I have tried Seiamic and ShakeDetector libraries. Please give me some valuable solution. 回答1: I have done that using this library : 1) Add the dependecy in your build.gridle file allprojects { repositories { ... maven { url 'https://jitpack.io' } } } dependencies { compile