Excuse me if this comes as a foolish question but I am a bit confused. I am creating a new application in which I am using a Tab Activity. However in that activity, I need to refer to other classes which require an activity as their parameters. For example, I have created a permission class to check for permissions when I try to access the camera and other things that require run time permissions.
But in order to use the requestPermissions function, it requires an activity class in order to do so. So in this case, is it OK in this case to pass my Tab Activity to my Permission class or should I just request the permissions in my Tab Activity?
Similarly, I also have a separate class to do my AsyncTask functions. In the onPostExecute of the AsyncTask, I want to display a dialog using my TabActivity context. From my research, I have concluded that for this I should make a static function in TabActivity which would handle that for me. Is this the correct way to go about it?
Thanks!