本文介绍了石英春天,像Android的那个调度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了很多。但我无法得到它的解决方案。在Spring中,石英作为调度重复特定的任务。同样在Android中,什么是调度可在特定的时间间隔反复做任务。我需要为Android调度和我也想以避免内存泄漏。我有5个不同类型的设置。所有具有更新间隔时间选项。所以我要得到一个基于时间间隔从服务器的信息。

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.

推荐答案

如果您的活动或服务中运行,使用的和的。

If running within your Activity or service, use Timer and TimerTask.

此外,还有延长计划和Commonware的一个 WakefulIntent

Further, there is AlarmManager for extended schedules, and Commonware's excellent extension of a WakefulIntent.

这篇关于石英春天,像Android的那个调度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 23:58