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
I like what @Alex and @Jack said. To add to that, also consider that you can call finish()
in your Activity
if you want to force it to close up and return to the last Activity. Going along with this, also consider the use of setResult(int)
(JavaDoc Here)
You can also set a flag on the Intent
when you call the Activity
you are questioning about. A flag like FLAG_ACTIVITY_NO_HISTORY could be helpful:
If set, the new activity is not kept in the history stack. As soon as the user navigates away from it, the activity is finished. This may also be set with the noHistory attribute.
List of Intent Flags