Relatively new to B4A, so excuse the, possibly daft, question, which is probably down to my complete misunderstanding!
The app I'm writing has a few activities and a service that get kicked off with a StartServiceAt command. All works fine, unless the process is shut down before the service start time. The service then dies with a null exception.
Looking at various posts on the site, I think the problem is that my service uses variables defined in the Main activity Process Globals.
What is the best way around this ? Would the same problem occur if I move those variables to the Code Module process globals ? Should I write the variables I need to storage (with kvs for example) in the activity and read them back in as part of the service ?
Should variables defined in Activity Process Globals only be used by other activities ?
Any help / advice appreciated.
Thanks
Graeme
The app I'm writing has a few activities and a service that get kicked off with a StartServiceAt command. All works fine, unless the process is shut down before the service start time. The service then dies with a null exception.
Looking at various posts on the site, I think the problem is that my service uses variables defined in the Main activity Process Globals.
What is the best way around this ? Would the same problem occur if I move those variables to the Code Module process globals ? Should I write the variables I need to storage (with kvs for example) in the activity and read them back in as part of the service ?
Should variables defined in Activity Process Globals only be used by other activities ?
Any help / advice appreciated.
Thanks
Graeme