There is no such concept as an active context.  You need to explicitly pass
the context you want to use to where you want it used.

On Thu, Sep 24, 2009 at 12:53 AM, Atif Gulzar <atif.gul...@gmail.com> wrote:

>
> bump. Thanks :)
>
> --
> Best Regards,
> Atif Gulzar
>
> I ◘◘◘◘ Unicode, ɹɐzlnƃ ɟıʇɐ
>
>
>
> On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar <atif.gul...@gmail.com>wrote:
>
>> Hi,
>>
>> How can get the active context of an application?
>>
>> The scenario is, I have an AsyncTask inside an activity_A. And on
>> successful completion (means in onPostExecute) of this AsyncTask I want to
>> show a dialog
>>
>> (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);)
>>
>>
>>
>> But in the meanwhile(before completing this AsyncTask) if the application
>> is moved to another activity_B. The above dialog context will not be the
>> current Context so it will through an Exception.
>>
>>
>> So is it possible to get the active Context dianamically? Thanks
>>
>>
>>
>> --
>> Best Regards,
>> Atif Gulzar
>>
>> I ◘◘◘◘ Unicode, ɹɐzlnƃ ɟıʇɐ
>>
>>
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to