Hey!
There seems to be an issue with asking runtime permissions. I've tested it several ways in both Android Studio and Xamarin Studio.
If the minimum android version is set (target version doesn't matter, but 7.0 in my case), the permission dialog is not shown when RequestPermissions() or ActivityCompat.RequestPermissions()
is called, instead, it instantly calls OnRequestPermissionsResult
with grantResults empty. I can provide the code if necessary, but it's easily reproducible.
When I simply remove the line <uses-sdk android:minSdkVersion="15"
, so that minimum and target minimum android version defaults to API 24, everything works -- but, obviously, this is not a solution.
Note that I am using Xamarin.Android.Support.v7.AppCompat library with a normal Activity as base class, not AppCompatActivity. Same approach works fine in Android Studio. And I have, yes, set the permissions in the manifest as well.
So, what's going on here? I'm losing my mind.
Best wishes,
Aare