Android Question Destroy activity

Hirogens

Active Member
Licensed User
Longtime User
Hello, I asked there is few moment about destroy activity. Someone told me use Activity.Finish but even if I use this, when I press my buton which open my new activity module, every time it's like nothing append.
I would like destroy my activity because I use a timer and every new journey I would like to restart to 0..
 

Emme Developer

Well-Known Member
Licensed User
Longtime User
With activity.finish you are destroying the activity. Timer should be used in process global or in a service, so it's value is not resetted when activity is reopened. You should use it in a service, restart it in activity create and initialize it in service or first time of activity create
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Upvote 0
Top