I have an async task that does a download and shows a progress dialog. I would like to be able to not show the dialog if it is called by the service and therefore cannot display the dialog. The problem is the way to determine what type of context I have (activity or application)?
source share