Closed dasbiswajit closed 5 years ago
As README.MD states, you should pass Activity Context if you request permission from Activity or Fragment Context if you request permission from the Fragment. "NOTE: new RxPermissions(this) the this parameter can be an Activity or a Fragment"
in screenshot of example via RxPermission constructor you are passing "this", which is instance of LocalAlbumImagePickerHelper and RxPermission constructors are not prepared for it.
Now solution: Luckily you are injecting Context (I hope and assume Activity context) via constructor of LocalAlbumImagePickerHelper and you store it in mContext field. Use that exact mContext and pass it to new instance of RxPermissions instead of "this". Compile error should be gone.
p.s. please read documentation before you post similar "issues". Probably this was more for Stackoverflow. Adding more tickets like this makes, life of maintainers more difficult and real project issues can be lost in a noise of non important tickets.
@tbruyelle IMHO this can be closed
@ewoks. Thanks. I have solved it. Ofcourse don't want to make developer unmanageable. I am able to fix this calling Rxpermission from from main activity
Closing the request
glad that it worked out
My app needs below permissions. Which has been incorporated in AndroidManifest.xml
After upgrading to API 26
some functionality is not working. As I need to incorporate runtime permission. I am using RxPermission . The problem is my most of the implementations placed on helper class(not inside main activity). when I am trying to use helper library getting error - .
I have tried with the following options too -
As RxPermission require Fragment as target.Can we ask user all the permission in the main activity? A sample code will help me. Project code for refarance