I'm trying to test my app, which uses geolocation using the emulator. Several methods are described here. I'm going to Window->Open Perspective->DDMS
, then entering lat. and long. one in Location Controls
and then I hit "Send".
But it doesn't work. Instead I see the following error: Unable to send command to the emulator.
Why is this happening!?
I don't think my app is the problem because I tested with the emulator's default browser and it also cannot access location info.
Details:
- OSX 10.9.4
- AVD_for_Nexus_4_by_Google targeting v4.4.2
- Eclipse IDE for Android Developers 23.0.2.1259578
Update:
I changed to AVD_for_Galaxy_Nexus_by_Google
and it still doesn't work, but I no longer see that error. I click send and nothing happens.
Update2: I've tested using Telnet to pass location data to the emulator, and again nothing happens. No errors. Just nothing. Urgh!
telnet localhost 5554
geo fix 50 50
It responds with OK
but nothing happens. Still no location data available.
Update3: I notice a stream of the following errors in LogCat
09-20 17:58:59.910: E/eglCodecCommon(1777): glUtilsParamSize: unknow param 0x00000b44
09-20 17:58:59.910: E/eglCodecCommon(1777): glUtilsParamSize: unknow param 0x00000bd0
09-20 17:58:59.930: E/eglCodecCommon(1777): **** ERROR unknown type 0x0 (glSizeof,72)
The app seems to be running fine, and these errors are supposedly explained here.
Update 4: I've seen multiple suggestions to confirm that my AVD has GPS Support enabled, but this option/setting does not appear anywhere. When I open the "Android Virtual Device Manager" and then click "Edit" on one of my devices, this is what I see:
No mention of "GPS Support".
Update 5:
I checked the config.ini file for all my AVDs and they are all correctly set to hw.gps=yes
. I also created an AVD using a Google API target, however I'm still having the same problem. The app loads but no location data is available, with "Location Controls" as well as telnet.
Update 6: Following Gyebro's suggestions below... trying to load his LocationDemo app...
Here's what I see in the LogCat:
yourLocationClient.getLastLocation()
return withnull
? Are you implementingLocationListener
? Could anything interfere with your emulator port (5554)? Have you tried Android Studio (and its Android Device Monitor)?yourLocatoinClient
, I'm very new to Android development so I'm not sure what that is. If you give me instructions I'll test. I haven't tried Android Studio but I tried with Genymotion plugin and it STILL didn't work.