Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I shake an Android Emulator device in Android Studio 3.0?

I need to test a newly developed app on multiple Android device emulators through Android Studio.

This app has multiple environments wherein this is hosted, like, qa, UAT, Production. I can change the environment through a screen that comes only after shaking a real device.

Unfortunately, Android Studio 3 does not give a direct option to shake the device. How can I achieve this shake action in the emulator ?

like image 442
Pomit Wadhawan Avatar asked Feb 05 '23 02:02

Pomit Wadhawan


1 Answers

Try

Ctrl + m for windows

⌘ + m for Mac OS-X

Ok Try this ... Goto Setting->Virtual Sensors in emulator menu

Click on Move checkbox

Now try moving X Y Z seekbar

You can use this code snap to detect shake ShakeDetectionDemo

Emulator

move emulator

like image 136
Naveen Dew Avatar answered Feb 06 '23 16:02

Naveen Dew