once10301 / permission

Other
66 stars 58 forks source link

Inconsistent permission status behaviour #13

Open JamesMcIntosh opened 5 years ago

JamesMcIntosh commented 5 years ago

When you request multiple permission statuses it looks like you can get different results than querying individually as PermissionStatus.whenInUse and PermissionStatus.always are not handled in the getPermissionsStatus(List<PermissionName> permissionNameList) case statement. They default to PermissionStatus.notDecided

see: https://github.com/once10301/permission/blob/master/lib/permission.dart#L14

once10301 commented 5 years ago

Describe your problem in detail?

JamesMcIntosh commented 5 years ago

Ah I see, getSinglePermissionStatus is for iOS and getPermissionStatus is for Android. This is VERY confusing and not obvious looking at the method signatures, I would recommend either:

once10301 commented 5 years ago

We can request permissions together when the user opens the app for the first time on Android, but we can only request single permission on iOS.

JamesMcIntosh commented 5 years ago

That makes sense as to why you took that approach, if you pass through an array of permissions into the iOS code you should be able to iterate them and accumulate the results to return back in one call.

once10301 commented 5 years ago

I am an Android developer, it is difficult for me. ^_^