Closed vekexasia closed 7 years ago
As a further note, I suspect that the permission is granted to the "fake activity" you use and hence is not readable by the subscriber since context is different :(
We are using RxActiivtyResult internally on RxPaparazzo
That should not be the problem 🤔
Feel free to reopen it
Hello,
I was in the process of using RxActivityResult to change the bad "code + onActivityResult override" pattern.
In particular, using Intent.ACTION_GET_CONTENT provides a SecurityException when trying to read the result.
Code is the following
The exception is the following:
It looks like that when using ACTION_GET_CONTENT the picker automatically allows permission to the requiring context to access the picked images. see http://stackoverflow.com/questions/38301605/reading-com-google-android-apps-photos-contentprovider-mediacontentprovider-requ and http://stackoverflow.com/questions/30572261/using-data-from-context-providers-or-requesting-google-photos-read-permission/30909105#30909105
I also tried using .targetUI() to get the context with no luck. (Expected also since both resultUI() and this are the same object).