[android-developers] Re: difference between start a service and a thread

2008-09-18 Thread elvisw
got it, deeply appreciate all your comments... thank u and hackbod... :) On 9月18日, 下午9時50分, Peli <[EMAIL PROTECTED]> wrote: > 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 pr

[android-developers] Re: difference between start a service and a thread

2008-09-18 Thread Peli
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 f

[android-developers] Re: difference between start a service and a thread

2008-09-18 Thread elvisw
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() ).

[android-developers] Re: difference between start a service and a thread

2008-09-18 Thread hackbod
Well you simply shouldn't start a thread in BroadcastReceiver, as explained here: http://code.google.com/android/reference/android/content/BroadcastReceiver.html (starting a thread would count as an "asynchronous operation"). A BroadcastReceiver lets you do a quick, on-shot operation in response

[android-developers] Re: difference between start a service and a thread

2008-09-17 Thread elvisw
or what about starting a service that starting the thread? On Sep 18, 2:08 pm, elvisw <[EMAIL PROTECTED]> wrote: > I'm not so familiar with the service mechanism. > A simple question here, > what is the difference between starting a service and starting a > thread in a BroadcastReceiver?? --~--~