You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coming back to this, we have plans to make a SavedStateHandle binding available in the ActivityRetainedComponent. You're right though that there is currently no way to handle process death in the ActivityRetainedComponent right now unfortunately.
dagger/java/dagger/hilt/android/example/gradle/simple/feature/src/main/java/dagger/hilt/android/example/gradle/simple/feature/FeatureModule.kt
Line 30 in c1ddd0c
Not persisting such state can cause unexpected behaviors and bugs, especially if this is used to share state between screens.
This raises following questions:
1.) if ViewModel is used under the hood for ActivityRetainedComponent, then how do I intercept
onCleared()
in my custom classes?2.) if ViewModel is used under the hood for ActivityRetainedComponent, then how do I get a SavedStateHandle into my custom classes?
3.) if ViewModel is not used for ActivityRetainedComponent, how do I get a reference to the SavedStateRegistry into my custom classes?
Overall, the question boils down to:
The text was updated successfully, but these errors were encountered: