Using Emulator:
1. Using geo fix
cd to your .\android-sdk\tools\ folder, and then telnet to your avd. e.g.
$ telnet localhost 5554
$ geo fix -118 35
$ exit
The help geo fix shows that it takes these parameters 'geo fix log lat
2. Using DDMS
In your emulator control view, using the Location Controls to send the location, e.g.
Using Android Device:
Use mock location generation tool like Location Spooler: https://market.android.com/details?id=org.ajeje.fakelocation&feature=related_apps
1) Start location spooling
2) Start the app
Note:
1. Remember to save in the android manifest xml the mock location permission;
Also refer to here:
http://stackoverflow.com/questions/2531317/android-mock-location-on-device
Awesome!! thanks :) all things at single article helped me a lot :)
ReplyDeleteThanks for the comment!
Delete