Xamarin.Forms.Maps sample on Android throws SecurityException for ACCESS_FINE_LOCATION

Hey,

I tried to build a Forms.Maps app and couldn't get it going because I got a SecurityException for ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION.

Therefore I downloaded the 'WorkingWithMaps' example. I changed my API keys and set it to build on Marshmallow.
It deploys to an emulator and shows a map but when I click on the 'Pin' tab I get a SecurityException for it needs ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION. But, as it's an example, these permissions are in the Manifest.
I checked that the FormsMaps.Init() function is called.
What am I missing?

Thanks
Dominik

Answers

  • ChristianReicheltChristianReichelt DEMember ✭✭

    Hi,

    I have exactly the same problem. I had a running app with maps fully working, but after upgrading forms and maps to 2.3.1.114, Android throws permission missing error. We also changed the build version to 6.0, maybe also a reason.

    Did you figure out what's the problem?

  • DominikFretzDominikFretz USMember

    Hi,

    I haven't been working on the app since then, so no. Haven't found a solution.

    • Dom
  • shashidharKSshashidharKS USMember ✭✭

    I am also having same problem. I am facing this problem after updating xamarin.forms.maps to 2.3.2.127.

    Any solution?

  • RyanOConnellRyanOConnell USUniversity ✭✭

    I also had this problem in Marshmallow but I seem to have resolved it now.
    Try setting the Maps property IsShowingUser to false.

    I now bind IsShowingUser to a property that determines if we have the appropriate permissions. Set it to true if we have permission or false if we don't. But in the first instance for testing, just try setting it to false.

Sign In or Register to comment.