Enable fake GPS on Android
Set permissions in AndroidManifest.xml:
uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION">uses-permission>
Find the correct local port for your Android emulator:
$ adb devices
List of devices attached
emulator-5554 device
The port we are looking for is in this case 5554. Now connect via telnet:
$ telnet localhost 5554
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Android Console: type 'help' for a list of commands
Set your preferred location manually: You set the location with the geo fix command:
geo fix $longitude $latitude
For example the city center of Barcelona:
geo fix 2.169919 41.387917
OK
No comments:
Post a Comment