// 以下仅是为了演示PendingIntent几个常量的区别
PendingIntent StopPendIntent1 = PendingIntent.getBroadcast(
getApplicationContext(), REQUEST_CODE_1, intent,
PendingIntent.FLAG_UPDATE_CURRENT);
Log.e("FLAG_UPDATE_CURRENT-->StopPendIntent1:", StopPendIntent1
+ "");
alarmMgr.cancel(StopPendIntent1);
PendingIntent StopPendIntent11 = PendingIntent.getBroadcast(
getApplicationContext(), REQUEST_CODE_1, intent,
PendingIntent.FLAG_NO_CREATE);
Log.e("FLAG_NO_CREATE------->StopPendIntent11:",
StopPendIntent11 + "");
alarmMgr.cancel(StopPendIntent11);
PendingIntent StopPendIntent12 = PendingIntent.getBroadcast(
getApplicationContext(), REQUEST_CODE_1, intent,
PendingIntent.FLAG_CANCEL_CURRENT);
Log.e("FLAG_CANCEL_CURRENT-->StopPendIntent12:",
StopPendIntent12 + "");
alarmMgr.cancel(StopPendIntent12);
PendingIntent StopPendIntent13 = PendingIntent.getBroadcast(
getApplicationContext(), REQUEST_CODE_1, intent,
PendingIntent.FLAG_ONE_SHOT);
Log.e("FLAG_ONE_SHOT-------->StopPendIntent13:",
StopPendIntent13 + "");
alarmMgr.cancel(StopPendIntent13);
}
});
}
}