Yes, as far as I understand there is the risk that your thread can get
killed anytime, because the system does not assume that a thread
should be running. The whole process will be killed including all
threads.

Carefully read this paragraph from the link given above by hackbod:
"Once you return from onReceive(), the BroadcastReceiver is no longer
active, and its hosting process is only as important as any other
application components that are running in it. [...] the system will
consider its process to be empty and aggressively kill it so that
resources are available for other more important processes."

Peli

On Sep 18, 3:07 pm, elvisw <[EMAIL PROTECTED]> wrote:
> Is it an okey implementation that
> starting a thread in BroadcastReceiver and the thread will not call
> back the BroadcastReceiver??
>
> The thread doesn't interact with the BroadcastReceiver, keeping doing
> its job, and doesn't care
> if the BroadcastReceiver is still active (still in onReceive() ).
>
> is there any risk here so that we must use Service??
>
> On Sep 18, 6:10 pm, hackbod <[EMAIL PROTECTED]> wrote:
>
> > Well you simply shouldn't start a thread in BroadcastReceiver, as
> > explained 
> > here:http://code.google.com/android/reference/android/content/BroadcastRec...
> > (starting a thread would count as an "asynchronous operation").
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to