Android Studio. Simulate multiple GPS points with Mock Location Plugin

If you develope an Android app with Android Studio you can send one GPS position using the Android Device Emulator.

Android-Studio-Android-Device-Monitor-01

Once you have launched the app you are developing in the Android emulator, you have to launch the Android Device Emulator, insert both location points (longitude and latitude) and press the “Send” button. Then your app will receive this coordinate, simulating the Android GPS

Android-Studio-Android-Device-Monitor-02

But if you want to simulate a route made with your device, with a lot of coordinates, you have to install one plugin, in particular the “Mock Location Plugin” for Android Studio.

First, you have to install the plugin in Android Studio.

You have to go to “Settings…”

Android-Studio-Mock-Location-Plugin-01

Then you have to click on “Plugins”, insert the text “gps emulator” in the search box and click on the “Browse” link.

Android-Studio-Mock-Location-Plugin-02

Then you have to click on the “Gps Emulator” plugin and click on the “Install plugin” button.

Android-Studio-Mock-Location-Plugin-03

You have to confirm the download and installation process.

Android-Studio-Mock-Location-Plugin-04

And then you have to restart the “Android Studio” clicking on the “Restart Android Studio” button.

Android-Studio-Mock-Location-Plugin-05

You have to confirm the restart clicking on the “Restart” button.

Android-Studio-Mock-Location-Plugin-06

Now you have the plugin installed in the Android Studio.

Once you have launched the app you are developing in the Android emulator, you have to launch the “Gps Emulator”.

Android-Studio-Mock-Location-Plugin-07

Then you have to configure:

  • The “Start Location” (latitude and longitude).
  • The “End Location” (latitude and longitude).
  • The “Steps”: the number of emulated coordinates that the plugin will send to your app.
  • The “Time Between Steps”.

And you have to clic in the “Start GPS Emulation” button to start sendind the emulated coordinates.

Android-Studio-Mock-Location-Plugin-08

 

Android-Studio-Mock-Location-Plugin-09

 

 

11 comments

  1. i got this error
    “couldnt connect to android emulator, make sure an emulator is running on the specific port”

  2. Downloading doesn’t work right now:
    Plugin Gps Emulator was not installed: Cannot download ‘[repository link here]’: Read timed out

  3. Pingback: [Solved] How to emulate GPS location in the Android Emulator?

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.