Thanks mike. But I don't agree with you . If I stop the service through stopSelf(), the service will not be waked up by alarm manager. It will not repeatly download data every 5 mins.
On Jun 23, 7:57 pm, Mike Hearn <[email protected]> wrote: > They're used by the framework itself, ignore them. > > On Jun 23, 6:59 am, Gavin <[email protected]> wrote: > > > My app have a service and it will create athreadevery 5 mins. > > Thethreadwill connect internet to download some data, and then exit. > > That's not the right design. Instead look into the alarm manager, you > want an inexact repeating alarm to send an intent to your service so > your process only runs when it's actually working. Make sure that > stopSelf() is always called, even if the process is killed half way > through the download! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

