9
我很高兴知道如何检查由AlarmManager.setRepeating在特定时间启动活动的Alarm Manager触发的Pending intent?如何检查由AlarmManager setRepeating触发的待定意图是否已在运行?
更具体地说,,我有一个活动,用特定的时间或重复的时间(它工作)开始另一个活动。但我想知道该请求是否已由用户设置?在这种情况下,我不应该启动某些值。
这就是我如何开始计划的活动。
Intent myIntent = new Intent(getBaseContext(),MyScheduledReceiver.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(getBaseContext(), 0, myIntent, 0);
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), interval, pendingIntent);
是的,这是有帮助的。 – NyanLH 2012-05-18 05:30:18
嘿,谢谢。很高兴帮助。可以给一个可以帮助我的+1。 :) – Wesley 2012-05-18 09:08:03