Hi all, (dropped the Erel part)
Before I start, i'm aware of the activity lifecycle etc. and have developed multiple B4A apps. However, currently i'm facing some problems with process-globals in a code module (which I always do).
Scenario
I'm running a multi activity app. which is bitmap intensive (caching etc.). In my Main activity by using Firsttime I load and assign some process_globals variables from a code module. In here I also prepare key value storage (SQL). My other activities also update process_global variables.
What happens
After a switching a few times between apps. I noticed my activities get recreated (which is normal) but I lose values from the process_globals in my code module.
In the list of apps. running (Nexus 5, on screen button right) I notice my current activity still shows.
When clicking on the app. in the list it recreates the activity but my process_globals have lost their values. Actually, it also lost stuff like initializing key value store etc.
Unclear???
When process_globals have lost their values does that mean the Process is not there anymore? If that is the case why is my app. still showing in the list of apps.?
If the process is killed does that always mean my Main activity starts when clicking the app. in the list of apps.? My Main actually does not start again when clicking in the list of apps., it only recreates the current activity so that would assume the process is still there.
I'm 100% sure that I don't clear the process_globals variables myself. To test this I now also initialize some values in every activity Create (by using Firsttime keyword) and then all works. However, I notices when I move back to my main screen it kicks off Firsttime again.
How do I exactly know when the process is killed and process_globals are empty?
Before I start, i'm aware of the activity lifecycle etc. and have developed multiple B4A apps. However, currently i'm facing some problems with process-globals in a code module (which I always do).
Scenario
I'm running a multi activity app. which is bitmap intensive (caching etc.). In my Main activity by using Firsttime I load and assign some process_globals variables from a code module. In here I also prepare key value storage (SQL). My other activities also update process_global variables.
What happens
After a switching a few times between apps. I noticed my activities get recreated (which is normal) but I lose values from the process_globals in my code module.
In the list of apps. running (Nexus 5, on screen button right) I notice my current activity still shows.
When clicking on the app. in the list it recreates the activity but my process_globals have lost their values. Actually, it also lost stuff like initializing key value store etc.
Unclear???
When process_globals have lost their values does that mean the Process is not there anymore? If that is the case why is my app. still showing in the list of apps.?
If the process is killed does that always mean my Main activity starts when clicking the app. in the list of apps.? My Main actually does not start again when clicking in the list of apps., it only recreates the current activity so that would assume the process is still there.
I'm 100% sure that I don't clear the process_globals variables myself. To test this I now also initialize some values in every activity Create (by using Firsttime keyword) and then all works. However, I notices when I move back to my main screen it kicks off Firsttime again.
How do I exactly know when the process is killed and process_globals are empty?
Last edited: