6

I'm having trouble getting the emulator to enable GPS. It's targeted to Google APIs 4.2.2 (hw.gps = yes). Emulator AVD settings

In Settings > Location access, access is turned on and GPS and wi-fi are both checked. Location access settings screenshot

When I telnet localhost 5554 and send a geo fix, I get an OK from the Android Console.

lkung$ telnet localhost 5554
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Android Console: type 'help' for a list of commands
OK
geo fix 50 50
OK

Yet if I open Maps, it says "Please enable Google apps location access." Maps fails to recognize GPS

I'm trying to test an app that is location-dependent using the emulator.

rainbowsprinkles
  • 257
  • 5
  • 11
  • are mock locations enabled in the Emulator? I haven't tried to use mock locations. Try using a simple class with a OnLocationChangedListener to test if the location it's being injected correctly. – NemesisDoom Aug 15 '13 at 03:15
  • @NemesisDoom Yes, it is - I forgot to take a screenshot of that, thanks for mentioning it. Settings > Developer options > Allow mock locations is checked. – rainbowsprinkles Aug 15 '13 at 03:23
  • Have you tried injecting a Simple Location into an OnLocationChangedListener? Just to test, if the location it's being injected correctly. – NemesisDoom Aug 15 '13 at 04:05
  • @NemesisDoom Ah, sorry, I didn't have time to try it last night! I ended up creating a new emulator and another settings link popped up - the trouble was that location access needs to be enabled for Google Apps as well. I appreciate your help, though! – rainbowsprinkles Aug 15 '13 at 21:30

1 Answers1

1

So, there is actually another settings just for Google apps...which is why the error message in Maps said Please enable Google apps location access. There's a separate Google Settings app separate from regular Settings. Classic misunderstanding of the error message...

Google Settings screenshot Google Settings location access setting screenshot

rainbowsprinkles
  • 257
  • 5
  • 11