I use this library usually for permission <https:/...
# android
i
I use this library usually for permission https://github.com/tbruyelle/RxPermissions And please notice that you can get the memory leaks

https://youtu.be/FrteWKKVyzI

So, my recommendation is to use Android Architecture Components instead of MVP https://medium.com/proandroiddev/android-architecture-components-cb1ea88d3835
m
ihor.kucherenko: In the article you wrote this architecture makes the code testable, but I can't see any tests in your GitHub. Looking at the code makes me feel it won't be easily testable. Can you show how it's testable?
😍 4
i
Please, watch the movie to get watch I mean
Yes, I can. I will add some tests to demonstrate it
j
@ihor.kucherenko I'm working in is small app with 4 screens and I don't think that add a whole library is a wise thing to do because the code in the presenter class that handle with Android preferences has 30 lines more or less and I don't have strong reasons to apply this kind of change.
Unfortunately the preferences API depends on activities objects but the majority of that code just do logic processing, so why should I move this code out of presenter and put him in to the view? Just to avoid pass context out of the activity?
i
Yes. Also please notice, that Presenter with code from Android sdk isn't good