At what point process variables loose their values?

Penko

Active Member
Licensed User
Longtime User
Hello there!

It's a shame, I am having a successful application on the Market and at the same time, it's not very clear to me.

I created a PRO version which is a key only. On the Main Activity of my application, I check if the PRO package is installed and set a boolean variable to True. This controls whether ads should be displayed. What I found out is - at the very beginning, if I start the application, there are no ads. But if I leave the phone away for several hours, when I start the application again, the ads are there.

My question is - if my application is unused for longer(say a couple of hours, or days), at what time do the process variables get back to their default values?

Should I use Activity_Resume of each Activity to ensure that the PRO Check will be handled no matter how you use the application?

Or, if you tell me that I will get FirstTime of Activity_Create, I may be able to use it as well for the PROCheck.

But the thing that is not clear to me - what happens to the values of Process Global variables if the application is unused for some time???
 
Last edited:

lagore

Active Member
Licensed User
Longtime User
How long an app stays in memory depends on the OS and memory requirements. If 'FirstTime' = True then you know that the app has been out of memory and you may have to re-initialise/load values or the 'State' of the app.
 
Upvote 0
Top