How to shake virtual device created by Genymotion (Android Emulator)
Asked Answered
U

5

10

I created a virtual device using Genymotion. I want to test an app that works with shaking the device. How can I make virtual device shake? I couldn't find how to shake that device.

Ushaushant answered 4/6, 2017 at 15:14 Comment(1)
Without using a USB-connected device for remote control? That's the only way I know how to do it.Factorage
L
6

⌘+m is working for OSX, Also Its working in Genymotion, for windows users willing to perform a shake gesture just use Ctrl+m

Lurk answered 20/7, 2017 at 5:22 Comment(1)
ctrl+m on windowsRippy
L
5

There isn't a native way to emulate a shake in genymotion, but you could try a tool like Frappe (Mac only) to send a shake action to the virtual device. Depending on the client you are trying to emulate, "adb shell input keyevent 82" may send a shake action, wake the device, or simulate a menu key press.

Latini answered 7/6, 2017 at 13:1 Comment(2)
"adb shell input keyevent 82" opens the menu not shakes.Ushaushant
@Latini Thanks. Works for me on ubuntu.Oriflamme
I
5

This method only work api under 15

For test accelerator and other like gravity,gyroscope,... can use this application.

First download sensorsimulator

This is 2 application. One install(SensorSimulatorSettings-2.0-rc1.apk) in emulator second(sensorsimulator-2.0-rc1.jar) run in your PC.

More info and full tutorial

enter image description here

Genymotion not support this feature :

More info Genymotion Shell

Other way :

You can use Android Studio emulator Android 6.0(Google APIS) x86.

This this emulator(All x86/x64 bit) very fast and support all sensors.enter image description here

Like this:enter image description here

Ilonailonka answered 8/6, 2017 at 4:31 Comment(2)
I installed apk to genymotion device and run both app and jar file. When i click Test Connect in sensorsimulator app, app freezes and makes device reboot.Ushaushant
Check install apk?Ilonailonka
S
2

For Genymotion in particular for windows use Ctrl+Shift+M.

Sturdy answered 20/9, 2020 at 10:4 Comment(0)
W
0

Fer Genymotion macos use CMD + SHIFT + M

Woodworm answered 6/9, 2024 at 8:32 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.