First thanks for your quick reply. I have well found the code you told me about (OnBootReceiver).
I have one more question 'cos i as i have said before i ma programming a service that i want to start when Android boot. My core class extends Service not BroadcastReceiver. So may i extend more than one time. I mean to extends Service and BroadcastReceiver. for the same class ? Maybe i need to add a public class OnBootReceiver extends BroadcastReceiver inside my service project ? But if so how to link this second class with the service one ? Regards Thierry GAYET NextInnovation.org +33(0)663.849.589 ________________________________ De : Mark Murphy <[email protected]> À : [email protected] Envoyé le : Mercredi, 24 Juin 2009, 14h08mn 24s Objet : [android-developers] Re: How to catch BOOT_COMPLETED_ACTION from an IntentReceiver GAYET Thierry wrote: > Hi, because i need to start a background deamon not just when an > application need to bind with, i have searched a way to auto-start it. > One interesting reply was given in this maillist and i wanna more > explanation on the way to catch BOOT_COMPLETED_ACTION from an > IntentReceiver ? > > The previous thread that i have found on this maillist was this one: > > " Use an IntentReceiver and catch the BOOT_COMPLETED_ACTION. Then in the > IntentReceiver call Context.startService() (but use carefully, only when > you really need a background *service* to run all the time). " > > http://markmail.org/message/7r6afkcusvwe2wfz#query:android%20autostart%20service+page:1+mid:uee3n7yjip6nsmfr+state:results You'll see this covered as part of: http://androidguys.com/?p=4411 Sample code implementing BroadcastReceivers for BOOT_COMPLETED can be found at: http://commonsware.com/AdvAndroid/ (scroll down, download the "Source Code" from the link, and look for SysEvents/OnBoot and SysServices/Alarm projects) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 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 -~----------~----~----~----~------~----~------~--~---

