My app is retaining all of the variable values when it closes and this is effecting how it runs when reopened. Is there any way to reset them all upon app close? or is there a w
You need to familiarize yourself with the Activity Lifecycle.
You could leverage onResume()
to reset your variables; also note onDestory()
and onPause()
.
UPDATE:
Killing the application in its entirety each time the app moves to the background is an anti-pattern. You should really look at your application and follow the aforementioned activity lifecycle pattern and take the needed steps to insure your variables exist as you desire based on state.