that is also possible.
Ricardo Belchior
2

Thats true, heavy-work can be delegated to service though and just triggered when we are confident user finished playing with likes/dislikes)) It can be not just onPause/onStop. Also with model when data saved offline and kind of “synced”, one can guarantee that in edge cases(app killed, backend is down etc.) that request might be performed later successfully, when it will become possible. But it adds up lots of complexity, and RxJava solution provided works fine, it is concise and suits in general.

Thanks for sharing it

Like what you read? Give Nikita Barishok a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.