George Brooks
George Brooks

Reputation: 199

Android: Setting the location

I want the place picker from the google places API to basically start in a fixed location in the AVD. If I use google maps or place picker it tells me "unable to determine current location", both my wifi and gps are turned on. I know that in simulation you need to give a location.

I accessed the extended controls for the AVD and put in lat and long coordinates, I then click send, I believed this was how to send 1 location to a device. Doing this makes no changes to my devices location, what do I have to do to just send 1 location that google maps and place picker will always start from?

My extended controls: enter image description here

And this is my place picker:

enter image description here

select this location is not the values I sent and it starts me at an incorrect location.

Upvotes: 0

Views: 48

Answers (1)

Sam Boychuk
Sam Boychuk

Reputation: 69

Six months ago when I was developing an app that used a score of Map related google services, the emulator was unable to utilize google-services. The consequence was that while I could add services, they would not function without the google-services library functioning on the AVD. In short 6 months ago there were no functional AVD images that allowed any google map/location services to work.

The solution (unfortunately) was to utilize physical android devices instead of the emulator. I don't know if there are still no AVD images that work with google-services - but you might want to start by checking if google-services functions with whatever AVD image you are using. If not - you may be out of luck.

Specifically - com.google.gms:google-services:3.0.0 (and any earlier version) did not work through the Android Studio emulator (AVD) 6 months ago.

Upvotes: 1

Related Questions