I have an object which contains all the global stuff that needs to be available to the entire app. However, among that information is a list of objects that listens to messages, among them the Main activity, in which this global object is declared.
The compiler don't like this, as you can't have activity stuff in Process_Globals.
What is the preferred way of handling this scenario?
Also, what is the difference between Activity and Me (in an activity)?
Activities are destroyed and recreated during the life time of your app. You should treat them as a temporary objects.
Services, on the other hand can keep on running as long as the process is alive. You should move all the global stuff that isn't tied to the UI to a service (or a class in the service).
Activities are destroyed and recreated during the life time of your app. You should treat them as a temporary objects.
Services, on the other hand can keep on running as long as the process is alive. You should move all the global stuff that isn't tied to the UI to a service (or a class in the service).
Ah, nice. That solves the immediate problem, as it's the code module I actually need a reference to. Everything that might manipulate the activity will go through public methods in the code module.