jamesmontemagno / Xamarin.Plugins

Cross-platform Native API Access from Shared Code!
MIT License
1.3k stars 380 forks source link

Marshmallow permission request is never shown. #265

Closed btripp closed 8 years ago

btripp commented 8 years ago

Please take a moment to fill out the following (change to preview to check or place x in []):

This is a

Which plugin does this impact:

Version Number of Plugin: 3.04 Device Tested On: Nexus 6P Simulator Tested On:

Expected Behavior

Ask for Runtime Permission

Actual Behavior

Does not ask me for Permission.

Steps to reproduce the Behavior

I am currently on a Nexus 6P. My location is turned on. I uninstall the app. And press debug in xamarin studio. When I press the button in my app for location, it never prompts me for Location permission. For some reason the app already has permissions. Even if I go into the app and disable the permission from within the phone. I never see a prompt asking me whether or not I want to allow location. Am I missing something.

Structure of app. I call getLocationAsync from the PCL. My activity calls it via ThreadPool.QueueUserWorkItem().

btripp commented 8 years ago

The issue was that my app was not correctly building for api version 23. Even though I had use latest idk (23), the app was saying it was built for an older framework. Once I changed the target like mentioned in the following link, everything worked great. https://blog.xamarin.com/is-your-app-ready-for-android-marshmallow/