I have an async task that makes an upload and shows a progress dialog. I would like to be able to not show the dialog if it is being called by a service and thus can't show a dialog. The problem is there a way to determine which type of context i have(an activity or an application) ?
if( context instanceof Activity ) {
//...
} else {
//...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With