Shake device to run Android application

How can we launch the application by simply shaking the device? I want to do something similar to the apphaker app.

+6
source share
1 answer

From activity, you can use the SensorManager to detect jitter, and then respond to that jitter. This is what AppShaker does. Here is an example project demonstrating one way to detect jitter.

+12
source

Source: https://habr.com/ru/post/886787/


All Articles