Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev-dagger] Current filtering state is lost across process death #731

Closed
Zhuinden opened this issue Apr 21, 2020 · 2 comments
Closed

[dev-dagger] Current filtering state is lost across process death #731

Zhuinden opened this issue Apr 21, 2020 · 2 comments

Comments

@Zhuinden
Copy link

Zhuinden commented Apr 21, 2020

In

The current filtering is not preserved in any way across process death, even though that is expected behavior. This was originally also a problem on master.

A possible solution would be to use a SavedStateHandle provided to the ViewModel from an AbstractSavedStateViewModelFactory.

I would expect this approach to be displayed in an example that is meant to "show how to use AAC ViewModel with Dagger", while still creating an app that works reliably even when it's put to background for a given period of time.

@rajBopche
Copy link

@Zhuinden Is there any way I can force this process death and observe the issue you are mentioning.
Like using an ADB command or some plugin tool on Android Studio?

@Zhuinden
Copy link
Author

Following the steps outlined in https://stackoverflow.com/questions/49046773/singleton-object-becomes-null-after-app-is-resumed/49107399#49107399 should work, although AS 4.0 had some quirkiness where the terminate button behaved differently. In that case, adb shell am kill packagenameis what works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants