Android Question Where to initialize process global classes?

Creideiki

Active Member
Licensed User
Longtime User
I want to create a class, and an instance of it has to be available for all activities as process_global at all time.

As I have understood I have to declare it in any sub Process_Globals.

But what is best practice to initialize it?
One way would be like here: https://www.b4x.com/android/forum/t...ss-in-process_global-error.19758/#post-115243
But then I have to call Init in every Activity (and service?).

What about the Starter Service? Would it be save to initialize the instance here? If I don't stop the service it shoud be active as long as the whole process isn't killed, shouldn't it?
 
Top