Answer by Aliaksandr Chaulytka for Android SavedStateHandle doesn't save in...
"Then I force-close my app and relaunch it.."I guess you kill the app completely =)One of the way for reproducing saveState case you need:Enable developers mode and check Don't keep activitiesProcess...
View ArticleAndroid SavedStateHandle doesn't save in ViewModel
I have a ViewModel which takes a SavedStateHandle parameter. I am saving a String in there like this: private fun saveString(str: String) { state.set(KEY_STRING, str) }Then I force-close my app and...
View Article
More Pages to Explore .....