标签:
mTimer =
new
Timer();
mTimer.schedule(
new
TimerTask() {
@Override
public
void
run() {
++mCount;
mHandler.sendEmptyMessage(
0
);
}
},
5
*
1000
,
5
*
1000
);
AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
am.setRepeating(AlarmManager.ELAPSED_REALTIME, firstTime,
5
*
1000
, sender);
AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime,
5
*
1000
, sender);
标签:
原文地址:http://www.cnblogs.com/dubo-/p/5574576.html