When Google announced Paging library in Jetpack suite, I was so grateful. My task was to implement a Network-Database (Room) structure data list that I could finish it within a couple of days by using the library.
In the last article, we talked about a state machine and how it could help our Android Development. We will keep diving deeper into how it could help us more by adding logic into the Auto Retry Mechanism, implement side effects, and integrating it into an Android application.
The state machine in Android series:
Part2: Android integration, and more? (
In the previous article, we only defined the side effects and triggered them along with specific events. We need to implement the behavior of those side effects.
First, we need to listen to the side effects…
State Management is a very regular thing we, as Android developers, have to do every day. From displaying a loading dialog when your user hits a button to managing network error with complex conditioning layers. The party is usually under control when we only have a couple of states to manage, such as:
Is the code above similar to you?
That looks very easy to manage. But when we invite more guests to the party, drunk guys could cause some problems.
This article is the second part of my series about Solve Network-Database (Room) by Android Jetpack Paging library and Coroutine:
In the first article, We went through how to solve network-database(room) by using Paging library and Coroutine. This article is about adding a refresh feature to the flow.
With the first article, your app is able to…
Dad, Husband, Android Developer, Manga/Video Game Lover, Unity3d learner.