permissions-dispatcher / PermissionsDispatcher

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

Conductor library support #496

Closed TemMax closed 5 years ago

TemMax commented 6 years ago

Conductor is a popular library that used as a replacing of fragments. Support for it will be so useful thing.

hotchemi commented 6 years ago

@TemMax Thx! Do you come up with good interface or plugin idea to support conductor?

hotchemi commented 6 years ago

Seems it has getActivity so that you can integrate easily.

https://github.com/bluelinelabs/Conductor/blob/131589670f485bdd85a606d3a125af0b0ae1a77d/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java#L287

Reopen if needed~

Sar777 commented 5 years ago

@hotchemi hi, can you provide any information about integration your library and Conductor, please? Because I have added @RuntimePermissions into a Controller class and gotten error: Class 'com.modelsample.main.test.TestController' can't be annotated with '@RuntimePermissions'

I think that your library can't generation some classes for handle permissions with Conductor :(

Thanks

hotchemi commented 5 years ago

@Sar777 I thought you should annotate activity and call method in activity as usual. Isn't it possible? 👀 If not we have to customize the library 🤔

Sar777 commented 5 years ago

it isn't good idea for Single Activity apps :( thanks for your answer

hotchemi commented 5 years ago

@Sar777 We're kind of positive for supporting but do you come up with a good idea?

Sar777 commented 5 years ago

Hello, I've added support of conductor. https://github.com/Sar777/PermissionsDispatcher/tree/feature/conductor

hotchemi commented 5 years ago

Oh, can you send us pull request? I'd like to take a look.

hotchemi commented 5 years ago

Prototype: https://github.com/permissions-dispatcher/PermissionsDispatcher/pull/546

hotchemi commented 5 years ago

@TemMax @Sar777 what do you think about https://github.com/permissions-dispatcher/PermissionsDispatcher/pull/574

hotchemi commented 5 years ago

PR is done