permissions-dispatcher / PermissionsDispatcher

A declarative API to handle Android runtime permissions.
https://github.com/permissions-dispatcher/PermissionsDispatcher
Apache License 2.0
11.21k stars 1.44k forks source link

on multi permissions request , how can i known what permission has been resolved? #672

Closed Stanllley closed 4 years ago

hotchemi commented 4 years ago

Could you elaborate more?

Stanllley commented 4 years ago

Could you elaborate more?

on current version , all callback has been executed after all permissions request has been resolved. i need know the result of each permission processing. and in most scenarios , only care about the result of allow and deny.

hotchemi commented 4 years ago

Could you elaborate more?

on current version , all callback has been executed after all permissions request has been resolved. i need know the result of each permission processing. and in most scenarios , only care about the result of allow and deny.

Then I'd recommend separating methods. This library just wraps Android runtime permissions API and you'll get the same problem even without the library. What do you think?

Stanllley commented 4 years ago

Could you elaborate more?

on current version , all callback has been executed after all permissions request has been resolved. i need know the result of each permission processing. and in most scenarios , only care about the result of allow and deny.

Then I'd recommend separating methods. This library just wraps Android runtime permissions API and you'll get the same problem even without the library. What do you think?

I've separated the methods , but I think since this library already supported multi permissions request in one check,this library should support this feature.

hotchemi commented 4 years ago

Again one of the good things of the library is this is just a wrapper of the Android permission API and you can easily imagine the exact flow once you've implemented the flow by yourself. If we interfere with the process and call requests per permission, might be convenient but you then need to go to the generated code once you face something weird around there. You do have a learning cost then.

Might be similar to ORM problem(if you don't know what kind of query is generated under the hood you end up face issues in someday) and I don't want to add avoid-able complexity as much as we can. But this is just my current thought and we'd take your proposal into account when we review the entire API. Thanks and any feedback is welcome!