Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android cancel all alarmmanager

I've question with cancel() in AlarmManager

when I set alarm I use AlarmManger, this my code

        StringBuilder q = new StringBuilder()
        .append(time).append(".")
        .append(day);
        String action = q.toString();

        Intent AlarmIntent = new Intent(Edit_Contract.this, ReceiverContract.class);
        AlarmIntent.setAction(action);
        AlarmManager AlmMgr = (AlarmManager)getSystemService(ALARM_SERVICE);

        PendingIntent Sender = PendingIntent.getBroadcast(Edit_Contract.this, 0, AlarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);

and then,I want to cancel all alarm which I set,what should I do

like image 578
user836807 Avatar asked Aug 29 '11 17:08

user836807


1 Answers

Are you sure you sure you did the research on the nose? Here's what i found during 2 minutes of looking: Android: Get all PendingIntents set with AlarmManager

like image 104
Moyshe Avatar answered Sep 28 '22 09:09

Moyshe