You really should be using an alarm to start your service and then stop it when done. If you are polling often enough (like less than every 5 minute or so) that this doesn't make sense, then you are going to kill the user's battery.
On Wed, Aug 26, 2009 at 2:10 AM, cnordvik <[email protected]> wrote: > > Thanks for a very detailed and informative response! > > It's a polling alert for football/soccer matches (FotMob > actually....), so maybe it is important after all :-) As a user I want > to know what is running in the background and polling frequently but I > have noted that Scoreboard and other apps are not showing that they > are running. To me this is not very friendly since I can't stop them > from polling the server once I have started the program. And I have no > idea if the polling is still active. We decided early on to inform the > user when we poll and allow them to click the notification to stop the > polling, so I guess we can use the setForeground safely :-) > > We are using the scheduling of alarm when the phone goes in "sleep" > mode but as long as the phone is awake we are using a regular timer. > > I think I have enough information to keep my service running now, > thanks again. > > -Christer > > > -- Dianne Hackborn Android framework engineer [email protected] 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 [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 -~----------~----~----~----~------~----~------~--~---

