-
Notifications
You must be signed in to change notification settings - Fork 30
Asking several permissions #10
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
Comments
Hi, Tsequier, This is a one way to ask permission request in a row. Please try it.
Sample Code public Queue<AndroidPermission> permissionQueue = new Queue<AndroidPermission>();
public Action allPermissionRequested;
void RequestPermissions(){
permissionQueue.Enqueue (AndroidPermission.ACCESS_COARSE_LOCATION);
permissionQueue.Enqueue (AndroidPermission.CAMERA);
permissionQueue.Enqueue (AndroidPermission.WRITE_EXTERNAL_STORAGE);
allPermissionRequested = () => {
// action for all permission requested!!
};
RequestPermission ();
}
void RequestPermission(){
if (permissionQueue.Count > 0) {
var p = permissionQueue.Dequeue ();
UniAndroidPermission.RequestPremission (p, RequestPermission, RequestPermission);
} else {
allPermissionRequested ();
}
} note thanks, |
Thanks for your answer, I'll try that ! |
Hi, this is not working. After asking for 1st permission, nothing is coming and app is stuck. If i close and reopen the then the next permission is coming up and so on. Can you solve this issue ? Edit : *I seemed to have found a workaround by adding some delay in between asking permissions. It works well. Without using Queue, I am just calling the UniAndroidPermission.RequestPremission subsequently with 1 second delay in a Co-routine. |
Hi, for me Co-routine doesn't work. But I found another way. My code. `private void Awake()
|
Hello ! I tried asking several permissions in a row (for exemple External storage and Camera) but I can't find a way, there is alway an issue like some permission request getting skipped....
How can I do that using your plugin ?
Thanks !
The text was updated successfully, but these errors were encountered: