Reputation: 3075
I am on mac . I started my genymotion emulator and then via android studio started ddms .
Kindly note that the send button in location control is not clickable . If do not use genymotion emulator and use directly the emulator from android studio the button is not disabled and works fine .
Do I need to do some steps before using ddms for genymotion emulator in android studio.
Upvotes: 0
Views: 997
Reputation: 7116
Genymotion's fake GPS positions cannot be controlled from DDMS. There are several other ways to do it:
It allows you to send mock data to the device (lat, long, altitude, accuracy and bearing). You can also open a GoogleMap view to choose your location more easily.
You can control the GPS position of a device directly from your instrumented tests by usgin the Java API. This API gives you the same level of control than the UI widget. You can find more information on the documentation.
Here is basically how to get it:
GenymotionManager genymotion = GenymotionManager.getGenymotionManager(ctx);
genymotion.getGps()
.setLatitude(64.13367829)
.setLongitude(-21.8964386);
You can find a full sample on Github
You can launch the genymotion console, connect to a specific device and then send commands to fully control the GPS. You can find more information on the genyshell documentation
Upvotes: 3