Gavin wrote: > 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.
Sure it will! Or, more accurately, your BroadcastReceiver that you register in the manifest for the AlarmManager will get invoked every N minutes, and it can restart the service. http://androidguys.com/?p=4411 Though waking up and turning on WiFi five minutes means you'll wreck your users' battery life. I heartily recommend Jeff Sharkey's Google I/O presentation, "Coding For Life -- Battery Life, That Is": http://code.google.com/events/io/sessions/CodingLifeBatteryLife.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---