If you are doing periodic updates I would think about using the AlarmManager to kick off the process after specified intervals. If you create a service it's possible that it will be killed by the OS to free resources.
http://code.google.com/android/reference/android/app/AlarmManager.html -- Zach Hobbs HelloAndroid.com Android OS news, tutorials, downloads On Wednesday 18 June 2008 16:00:38 Jaikishan Jalan wrote: > Hi, > > Thanks for the reply. I understood what you are saying. I wrote my Intent > Receiver which will receive to this broadcast message. Now I want to run a > background process which keeps running forever ( which do some update after > every sometime t). My approach to this problem is this : I am going to > write a Service Calls and call it from the onReceiveIntent method of the > IntentReceiver I wrote. Now, onStart method of the Service Class, I will > create a thread that updates and then sleep for time t and keep running. > > Is this a recommended way to approach this problem? > > Thanks > J > > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of Damien > Sent: Wednesday, June 18, 2008 8:51 AM > To: Android Developers > Subject: [android-developers] Re: Running a program when emulator start > > > Android broadcasts a message on boot. See > > http://code.google.com/android/reference/android/content/Intent.html#BOOT_C >O MPLETED_ACTION > > If you have something listening for this broadcast then it will start > as soon as the > boot has completed. > > Regards > D. > > On Jun 18, 11:18 am, Jaikishan <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I was wondering if its possible to start a program automatically in > > the background as soon as the emulator gets started? The idea is to > > show some message on the status bar. > > > > Thanks > > -J > > --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

