When testing a map application which uses GPS functionality on the Emulator you can manually set the current latitude and the longitude using the “Emulator Controller” view provided by the Eclipse IDE. In this post I have given you a full guide to create an emulator with GPS support and how to set the location on Emulator. I hope this guide will helpful for you. 🙂
Emulator with GPS Support
First of all check whether your Emulator supports GPS. If not you can edit your AVD by adding it as a new property to Hardware as follows.
- Select AVD Manager icon–>Select the existing device–> Edit–>
- Check the Hardware properties (If it doesn’t support)–>Select New–>add “GPS Support” from the drop down list
- Now the new property will be displayed as follows. Select Edit AVD.
Steps to set the location on Emulator
- Goto Windows–>Show View–> Other
- Select “Emulator Controller” available under Android
- Now the Emulator Controller will be added as another tab next to the Console.
- You can set the location at “Location Controller” and when you click “Send” the Emulator will detect it as a new location Change and if you have designed to reload the map when location is changed, it will animate your map to the given new location.
Thank You! 🙂