In my previous blog on using Room with Android, I outlined how one can use Room to effectively store app data after a user has exited your app for a better user experience. If you haven’t read this blog, you can read it here:
But what about cases where your app is running and its state is changed—for example, when the phone’s orientation is changed from portrait to landscape and vice versa?
Continue reading “Using ViewModels in Android to preserve your running app’s state”