Search code examples
google-mapsxamarin.androidlocation-servicesxamarin-android-player

Google Maps and Locations in Android Player


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?


Solution

  • 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.