Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Include permission in manifest automatically #19

Closed
jamesmontemagno opened this issue Jun 21, 2016 · 2 comments
Closed

[Android] Include permission in manifest automatically #19

jamesmontemagno opened this issue Jun 21, 2016 · 2 comments

Comments

@jamesmontemagno
Copy link

A nice pattern is if your plugin requires a permission you can add an assembly attribute:

https://github.com/jamesmontemagno/Xamarin.Plugins/blob/master/Media/Media/Media.Plugin.Android/Properties/AssemblyInfo.cs#L18-L19

@SimonSimCity
Copy link
Owner

SimonSimCity commented Jun 22, 2016

Thanks for this information. Currently it depends on your implementation if you need the permission WRITE_EXTERNAL_STORAGE - that's why I chose to only note it down in the manual.

Even if it's the recommended way to write to a location outside your app (what requires the permission), you can download the file to a temporary directory by not providing any destination directory. This allows you to move it to an app-internal directory when the download has finished. Additional info is provided in #10

But I'll check if the permission is set when you try to start a download to a specified destination in #20.

@jamesmontemagno
Copy link
Author

Ah gotcha, I didn't realize that it was optional :) Good to know.

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

No branches or pull requests

2 participants