So, it's not "ugly" to finish my Activity and let that message in the
MessageQueue of the main thread? :)

On Fri, Apr 3, 2009 at 3:21 PM, Dianne Hackborn <hack...@android.com> wrote:

> Provided your process doesn't get killed, your process's main thread will
> handle that message whenever it comes up, regardless of what happened to the
> activity.  Handler doesn't know anything about the activity state.


Did you say the main thread has its own handler?! So, if mine no more
exists, the it will handle that message?


>
> On Fri, Apr 3, 2009 at 11:17 AM, Taísa Cristina <taisa.san...@gmail.com>wrote:
>
>> Hi all,
>>
>> I have a Handler implementation that is used in my Activity.
>>
>> While handling the messages, there's a value of "msg.what" which makes my
>> Activity to finish itself.
>>
>> My problem is that, when that "killer" message arrives, there's another
>> one in the message queue also destined to my handler.
>>
>> In this case, what happens if I just finish my Activity?
>>
>> I could see that no exception raised.  But, who will handle this lost
>> message since its Handler no longer exists?
>>
>> ** I have another Activity receiving messages containing the same data as
>> the killer one. So, [ I think ] I can't use "removeMessage(what, obj)".
>>
>> Taísa
>>
>>
>>
>
>
> --
> 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.
>
>
> >
>


-- 
Taísa Cristina Costa dos Santos
Computer Engineer
Brazil, SP
55 19 8152-7453

--~--~---------~--~----~------------~-------~--~----~
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