Open davirec opened 2 years ago
Hi @davirec,
Thanks for this detailed bug report. I am able to reproduce the issue. However, coordinates in your reproduction scenario are only valid when testing on the same device as yours ; please specify with which Android device and version you reproduced the bug.
I understand the concerns behind data loss, but I have to admit that I don't understand how impacting this is in this particular case. Does that loss of focus is frequently hindering your user experience? Feel free to tell me more 🙂
Hi thibseisel! Sorry, did not mean to ignore you, somehow notifications went past me.
I'm working with apps hosted on F-droid to check for data loss after double screen rotation for a software engineering experiment. Among the activities of this research is to report the failures found to the developers. We are working to understand how the data loss problem manifests itself in applications to develop automated solutions, following the android documentation guidelines.
Device:
A data loss problem occurs when data is accidentally deleted or state variables are accidentally assigned with default or initial values. This issue is related to the activity's lifecycle (1). When a screen rotation occurs, the activity is destroyed and resumed. Data loss will happen if the developer does not save the variables before the destruction and restore them after creation. To avoid this, the developers have to implement both the logic necessary to save the activity state in the onSaveInstanceState() callback method and the logic to resume its state in the onRestoreInstanceState() callback method. Another way to avoid data loss problems is to use the view model, designed to store and manage UI-related data in a lifecycle-conscious way (2).
Note: