Shake the device to launch an application in Android
Question
How can we launch a application by just shaking the device? I want to do something similar to the app "Appshaker".
Solution
From an activity, you can use the SensorManager
to detect a shake, then react to that shake. That is what AppShaker does. Here is a sample project demonstrating one way to detect a shake.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow