That's why i dont like answering such questions ... Although your answer is pretty much correct, it's also promising that eventually he'll return to the forum asking how come this isn't working on all devices.
That's the whole "teach a man to fish" thing... had he done a simple search for his question, he'd get the full answer with booth needed filters (quickboot_poweron is needed as well). On Tuesday, December 11, 2012 4:24:58 PM UTC+2, Mark Murphy (a Commons Guy) wrote: > > On Tue, Dec 11, 2012 at 9:14 AM, Bajrang Asthana > <[email protected] <javascript:>> wrote: > > I want to know how to start service at boot time? > > Register a BroadcastReceiver in the manifest for > ACTION_BOOT_COMPLETED, and have the receiver start the service. > > Having an always-running service is an anti-pattern in Android, > > > I am wondering how do > > apps like Easy Battery Saver or Open Advanced Task Killer work? > > Note that apps like Advanced Task Killer are designed to help users > defend themselves against developers who try to have an always-running > service. > > > Is starting service at boot time possible in Android 3.1+ > > Yes, though you will also need an activity on Android 3.1+, and the > user must manually launch that activity before your boot-time > BroadcastReceiver will get control. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 4.4 Available! > -- 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

