Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Ask for permissions on Android Marshmallow #82

Open
Cheesebaron opened this issue Mar 29, 2016 · 4 comments
Open

Ask for permissions on Android Marshmallow #82

Cheesebaron opened this issue Mar 29, 2016 · 4 comments

Comments

@Cheesebaron
Copy link
Member

A lot of our plugins need permissions to operate on Android Marshmallow and up. The new model is that each first time a feature is used that require a permission, a dialog appears prompting the user to either allow or deny access.

Currently we ignore this and plugins are probably not working correctly on Marshmallow if app is targeted for API level 23 and up.

@xleon
Copy link

xleon commented Mar 29, 2016

Instead of implementing such thing in every plugin, what about a global permissions plugin that other plugins could use? Kind of this: https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Permissions

@Cheesebaron
Copy link
Member Author

It takes like 2 classes to wrap that plugin @jamesmontemagno made for permissions. I guess we could do that. Although, this would mean that the user will have to add:

public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
{
    PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}

In their Activities, which is OK I guess. Otherwise MvvmCross should do that internally. Not sure which.

@Cheesebaron
Copy link
Member Author

I've created #83 for this.

@ferrydeboer
Copy link

ferrydeboer commented Apr 26, 2016

I'd like to see if I can contribute to this issue. My question is how do you test these plugins when writing them? I mean it might be convenient to be able to debug. Do you have some local test projects or am I simply missing something in the repo?

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

No branches or pull requests

3 participants