I was just playing around with a service which does some polling on the background. The actual work it does when run is really really light. I was wondering, what is the lightest and best way to do this kind of polling. Using a Timer with scheduleAtFixeRate, or using AlarmManager and setRepeating? Any ideas and/or opinions? I'm also thinking of stopping the polling when the screen is off as there is no need to do it when the user is not actively using the phone. So I will be destroying and creating a new timer each time the user turns on/off his/her screen. So the actual creation of the polling should also be quite light.
-- 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

