Each Android app has an authentication mechanism or at least most of them do. What this auth mechanism does is that it refreshes an access token using a refresh token every N minutes. In our case these N minutes are 7. And now the question is: How do I implement this?
Continue reading “Execute an RxJava observable only once in a given time period”
Testing data classes in Kotlin
As we all know, data classes are final by default on Kotlin and if you try to use Mockito and mock such a class, you will get an exception. What you need to do is add this file:
Continue reading “Tricky parts when implementing unit tests for Android in Kotlin”
I recently had a very strange bug when it comes to using a BehaviorSubject inside the object that I am testing.
Continue reading “Race conditions in unit tests with RxJava when using TestScheduler”
.flattenAsObservable(list -> list)
Continue reading “RxJava toList – completes only after onComplete is called”
Using RxJava with the architecture components from Google in the latest project that I was working on, it made me think how does error handling fit with the LiveData and can you keep the RxJava error handling which I find quite nice.
Continue reading “RxJava & LiveData combined error handling”