I’m working on Android application. In this, I need that when I capture image or selects from gallery for uploading, it should show current location like city etc. I’ve tried using GPS but when I run it on Android Emulator, it shows Latitude and Longitude with 0 ,0 . Any help will be appreciated. What should I do for this ?
Share
You can not fetch GPS in emulator.But there is a work around for that
Connect to your emulator.Like shown above and then
First two are longitude and latitude values and the last one is altitude in meters.
Now from there you can call from GeoCoder
http://developer.android.com/reference/android/location/Geocoder.html
It will return a list of Address that has a method getLocality
Try with various values and check!