1

I am working with locations and google maps, Its working fine when I am using the application on a android device. But I am not able to load the maps on emulators. I also tried Android Player and when I am loading the maps,it is not able to find the current locations. Can anyone help me on this?

2 Answers2

0

if it works on an Android phone, then it should work.

you probably do not have the Google Play Services installed the Android emulators you were testing. Also for the Android player, these devices does not usually come with a GPS chip, not even the Google Nexus Player.

kaho
  • 4,746
  • 1
  • 16
  • 24
  • I have installed google play service and now I can use google maps app on my android player. The only problem I am facing is in finding the current location. I tried setting some mock latitude and longitude but still its not working. – Moni Bhattacharya Aug 24 '15 at 16:28
  • which methods are you using to get the location? – kaho Aug 24 '15 at 16:30
  • I am using Android Locations to find out current location. On Location Changed method I am finding the current location. Its giving me the perfect results on android device, but I unable to get the current location on Android Player. – Moni Bhattacharya Aug 25 '15 at 03:22
0

After a long research, I found some solution for my problem. I tried using Genymotion emulator, which seems to be the best emulator for testing apps on emulator, it works like a physical device connected with USB. It is also very fast as compared to the built in emulators with android sdk.

I followed following steps to make maps and locations work on my emulator:

  1. I installed genymotion emulator from here https://www.genymotion.com/#!/
  2. Then downloaded the device as per my requirement.
  3. Then I installed google play services in genymotion.below link will help in this http://inthecheesefactory.com/blog/how-to-install-google-services-on-genymotion/en
  4. Then added google account to access play store.
  5. Then Enabled GPS and location access from settings.
  6. Also enabled GPS from settings available in genymotion and set my current location. 7.As I am using free version of genymotion so network settings are not accessible so I used gps provider for getting locations.

And now I can see my map working

Note - Sometimes the network setting like proxy and firewalls also create issue in fetching locations so need to check that also.