I would like to run some tasks when certain types of x are closed. The first idea is to be a global counter, which turns off the activity x every time, and when the counter is 0, then run some action. Assume that the process can be killed, the counter must be maintained. But another problem remains - Imagine that the activity X could crash (due to some bug in the code), and in this case I will not reduce the counter.
How to implement any idea in a robust way?
I'm sure what you mean by 'off', but you're able to use the activity
There is a diagram on the following page that shows how the activity lifecycle is implemented:
Comments
Post a Comment