To get Android Genymotion Mock Location Google Play fused location provider working in an emulator these are the necessary components and steps. (For Genymotion 2.5.x emulator versions)
- Genymotion ARM Translation v1.1
- Google Apps / Play Store for a Genymotion emulator running SDK 5.1 (API Level 22)
- Install these two zipped APK archive files by dragging the zip files directly onto your running Genymotion Emulator in order. Start first with ARM Translation v1.1. It will ask for confirmation. Click OK.
- After the APK file is unpacked and installed, genymotion emulator will ask to restart. To restart your genymotion emulator, in a command prompt on your computer, issue an emulator reboot command: adb reboot. The emulator will reboot several times. For me: 4 times it will cycle before settling down and showing the home screen.
- Repeat with the Google Apps Play Store file (gapps-5.1-xxxxx) file – drag and drop, confirm install, adb reboot. This should only cycle off/on your emulator once, unlike the ARM Translation APK you installed earlier.
- Click on the Home button (center white circle with dots at bottom) and find Google Play Store. Click it to start Google Play. It may ask to update. If so, update it.
- Google Play Store in Genymotion crashes repeatedly after install on a Genymotion emulator. To fix the Google Play Store crashes on Genymotion emulator, open the Settings application in Android (gear icon), scroll down and click on Apps. Click on Google Play Store. Click on Clear Cache and Clear Data. Click OK on any dialogs that come up.
- Restart Google Play
- Accept Terms and Conditions again
- You may or may not have to log in again. If you get an error regarding you must be logged in when trying to search for Maps, click on the three horizontal bars at the top left of the Google Play home screen to slide out the left tray and click My Account. Log in if asked to do so. For me it auto-logged me in from cached credentials.
- Back in Google Play, text search for maps. Google Play should not crash.
- Install Google Maps.
- In Google Play, find and install a mock location provider such as Mock Locations or Fake GPS. Mock Locations (fake GPS path), which allows you to draw out a path which you can “drive” or “walk” at your desired speed between locations of your choice. I find this quite useful when using GoogleApiClient fused provider where requestLocationUpdates is returning Location objects repeatedly over a period. Very helpful when you’re testing Entering and Exiting GeoFences
- Don’t forgot to turn on High Accuracy mode in Settings -> Location -> Mode -> High accuracy, which allows GoogleAPIClient Location Services fused location provider to work properly. I didn’t have much luck running Google Play Services Location Provider with GPS (Device) only Location setting.
- And finally Dev Tools (application on Genymotion) -> Developer Options -> Allow Mock Locations needs to be On.