I want to get longitude and latitude in Android emulator for testing.
Can any one guide me how to achieve this?
How do I set the location of the emulator to
I was looking for a better way to set the emulator's GPS coordinates than using geo fix
and manually determining the specific latitude and longitude coordinates.
Unable to find anything, I put together a little program that uses GWT and the Google Maps API to launch a browser-based map tool to set the GPS location in the emulator:
android-gps-emulator
Hopefully it can be of use to help others who will undoubtedly stumble across this difficulty/question as well.
In Linux where communication ports are blocked. navigate the terminal to platform-tools folder inside android sdk
and fire this command:
./adb -s #{device_name} emu geo fix #{longitude} #{latitude}
I use eclipse plug DDMS function to send GPS.
If you're using Android Studio (1.3):
First go in DDMS section in your eclipse Than open emulator Control .... Go To Manual Section set lat and long and then press Send Button
If you are using eclipse then using Emulator controller you can manually set latitude and longitude and run your map based app in emulator