[Solved] My app resets data when it is minimized


onStart is called every time the app starts. onCreate on the other hand, is only called when the app starts or after the activity process has been killed and restarted. Usually the last scenario means after onStop is called and the activity process is killed, but it isn’t destroyed yet.

Move that code to onCreate, otherwise it calls that every time the app is reopened which resets it

7

solved My app resets data when it is minimized