更新时间:2022-12-26 14:15:32
Place this in onCreate
of a service.
mTimer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
// What you want to do goes here
}
}, 0, REFRESH_TIME);
REFRESH_TIME
is the frequency or time in milliseconds when the run
repeats itself.