2

I have read several questions regarding this topic but none of those answers works for me.

I am using an x86 64 bits image of Android 6.0 (API 23) with Google APIs and I am try to simulate a location change by using the Control Panel (UI) of the emulator and via telnet, both without success. When using telnet I am doing this:

telnet localhost <port>
auth <my_token>
OK
geo fix -32 -68
OK

It says "OK" but actually nothing happens (the method LocationListener.onLocationChanged is not called) but the listener code is working if is tested in a real device. And I need to simulate a location changed to test some features of my app.

If I understood correctly is required that I add the ACCESS_MOCK_LOCATION permission to the manifest in order to make this work but this need to be added inside a debug manifest so I created this inside of src/debug/AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my.package.myapp">

    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>
</manifest>

And I launch the app by using the "Debug 'app' (Mayus++F9)"

What am I missing?

Thanks in advance.

EDIT: I have updated the SDK Tools from 25.2.2 to 25.2.5 but the problem remains.

mevqz
  • 653
  • 3
  • 9
  • 19

0 Answers0