Hi to all!
I've a design issue about my app. I've an instance of a class called AdsManager, that i use to display ads in many activities. My problem is that i want a single instance of this class, shared beetween all activities. So i declared this class in Starter service. But inside the class now there are 2 instance of Activity objects, that i need to have global, in order to use them in many class sub.
Now problem is that i can't have both things, because if i declare 2 activity objects in global sub in class, then i can't declare class under process global in starter service.
Is there any workaround to achieve what i want? Thanks!
I've a design issue about my app. I've an instance of a class called AdsManager, that i use to display ads in many activities. My problem is that i want a single instance of this class, shared beetween all activities. So i declared this class in Starter service. But inside the class now there are 2 instance of Activity objects, that i need to have global, in order to use them in many class sub.
Now problem is that i can't have both things, because if i declare 2 activity objects in global sub in class, then i can't declare class under process global in starter service.
Is there any workaround to achieve what i want? Thanks!