S Stern0m1 Member Licensed User Feb 2, 2017 #1 Please excuse me if this doesn't make so much sense, I am a newbie. I have an activity module and a service module. I am calling variables in the service module from the activity module. How can I can call those variables if the OS kills the activity module? Do I have to write the data to a file? Thanks
Please excuse me if this doesn't make so much sense, I am a newbie. I have an activity module and a service module. I am calling variables in the service module from the activity module. How can I can call those variables if the OS kills the activity module? Do I have to write the data to a file? Thanks
E edgar_ortiz Active Member Licensed User Longtime User Feb 2, 2017 #2 Hi, Define your variables in the "Starter" service. https://www.b4x.com/android/forum/threads/starter-service-consistent-single-entry-point.57599/ Regards, Edgar Upvote 0
Hi, Define your variables in the "Starter" service. https://www.b4x.com/android/forum/threads/starter-service-consistent-single-entry-point.57599/ Regards, Edgar
Erel B4X founder Staff member Licensed User Longtime User Feb 3, 2017 #3 The best place for public global variables is the starter service. Process global variables can be accessed even if the activity is destroyed. Upvote 0
The best place for public global variables is the starter service. Process global variables can be accessed even if the activity is destroyed.
S Stern0m1 Member Licensed User Feb 3, 2017 #4 If the entire app gets killed and is restarted will those variables retain their values? Thanks. Upvote 0
MaFu Well-Known Member Licensed User Longtime User Feb 3, 2017 #5 Stern0m1 said: If the entire app gets killed and is restarted will those variables retain their values? Thanks. Click to expand... No Upvote 0
Stern0m1 said: If the entire app gets killed and is restarted will those variables retain their values? Thanks. Click to expand... No