I have a timer in my code. When the screen orientation is changed or when I leave the app with the back button, the timer does not retain the value. Is solved with onPause, onStop, onCreate methods .... but do not know exactly how. What solution might be in each case?
Asked
Active
Viewed 32 times
1 Answers
0
U have to store the time value in onSaveInstanceState, then inside in onCreate u have to reassign saved time value.

user2851150
- 397
- 5
- 12
-
And from where I call onSaveInstanceState method? – user3764379 Jun 27 '14 at 11:19
-
@user3764379 You don't call it, you override it. – Simon Jun 27 '14 at 11:26