Your code is broken if it is using a handler like that -- once you return from the broadcast receiver, the system no longer knows of anything useful running in the process, so is free to kill it. Typically this will happen very quickly from boot completed receivers, since everyone and their mother has one (sigh) and so we thrash through a ton of processes during that time.
If you need to continue running after the receiver returns, you need to start a service. But please think about how much you really need to do this -- doing this kind of thing is very hard on the system. (Imagine 10 apps all launching services at boot. Ouch.) At the very least, please only do this if the user has actually configured your app in a way that it is needed, by having your boot completed receiver disabled by default and only enabling it when needed. On Tue, Oct 13, 2009 at 5:37 AM, Honest <honestsucc...@gmail.com> wrote: > > Hello, > > My application used to start when phone start by broadcast reciever. > After that i used to execute some code after every 10 seconds. Using > handler but after some time it used to stop execution. Can some one > tell me what can be reason behind it ? > > > -- 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 -~----------~----~----~----~------~----~------~--~---