问题
I searched a lot. But i can't get the solution for it. In Spring, Quartz
is used as a scheduler to repeat the particular task. Likewise in android, what is the scheduler is available to do the task repeatedly at the particular time intervals. I need a scheduler for Android and also i want to avoid memory leakage. I am having 5 different types of settings. All having the update interval time option. So i want to get the information from server based on the interval time.
回答1:
If running within your Activity or service, use Timer and TimerTask.
Further, there is AlarmManager for extended schedules, and Commonware's excellent extension of a WakefulIntent.
来源:https://stackoverflow.com/questions/14823717/quartz-in-spring-like-that-scheduler-in-android