I am changing my android mobile app to support both tablets and mobile phone. For this I am changing my activity class into fragment. In my activity class I have an instance of my application class created as below:
appCtx = (UnityMobileApp) getApplication();
Where UnityMobileApp
is my Application class.
Now I want to create the same instance in my fragment class. Can you guys please help me solve this?
Use appCtx = (UnityMobileApp) getActivity().getApplication();
in your fragment.