Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Android ACCESS_MEDIA_LOCATION Permission not handled by the plugin #179

Open
claudioredi opened this issue May 20, 2020 · 5 comments
Open

Comments

@claudioredi
Copy link

I was wondering why the plugin is not handling new Android 10 permission ACCESS_MEDIA_LOCATION

Is there a design reason for that or it's just pending?

@jamesmontemagno
Copy link
Owner

I mostly didn't know it was added lol. I would switch to Essentials as it has an extensibility model on permissions like I noted.

@claudioredi
Copy link
Author

Perfect! Sorry about the duplicated question. I was thinking about sending you a pull request for this plugin but then I saw that latest version references Xamarin.Essentials so provided is going to be a dependency nonetheless, likely it's better to move to that library :)

@francobazzigotti
Copy link

francobazzigotti commented Jul 1, 2021

@jamesmontemagno
It seems that until today it's not implemented even in Essentials...
It's necessary to get GPS data from images. And it's not trivial to use the API extension to map to ACCESS_MEDIA_LOCATION

@francobazzigotti
Copy link

francobazzigotti commented Jul 23, 2021

I solved adapting the extensible permissions ReadWriteStoragePermission example inserting the '[assembly: Dependency:...] line that I didn't remember to set before.
It works on my Android11 device , even if the strange thing is that after unistalling and reinstalling the app I don't receive a specific media location consent prompt but only the ordinary multimedia access consent prompt! The fact is that now files are not GPS-zeroed for my app.

@jamesmontemagno
Copy link
Owner

jamesmontemagno commented Jul 23, 2021

You can easily extend permissions with custom permissions as well. It is all well documented here:

https://docs.microsoft.com/en-us/xamarin/essentials/permissions?context=xamarin%2Fxamarin-forms&tabs=android#extending-permissions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants