I am using Handler for communicating between Current Activity and a subclass of Application.
Subclass is having a thread which processes web service calls.
Subclass may also have a ProgressDialog instance.

I want to show ProgressDialog when http call is starting and dismiss dialog when call is finished.

For this to happen, I need to access Activity from Handler. And then assign activity to Dialog using setOwnerActivity.

Is this possible? I tried and cant not get activity from Handler. The max Handler can give is Thread which sent message.