How can I mock my location on a physical device (Nexus One)? I know you can do this with the emulator in the Emulator Control panel, but this doesn t work for a physical device.
Gps - Android mock location on device
De openkb
Sommaire |
Questions
Answers
It seems the only way to do is to use a mock location provider.
You have to enable mock locations in the development panel in your settings and add
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
to your manifest.
Now you can go in your code and create your own mock location provider and set the location of this provider.
Source
License : cc by-sa 3.0
http://stackoverflow.com/questions/2531317/android-mock-location-on-device