Android cancel all alarmmanager

I have a question with cancel () in AlarmManager

When I set the alarm, I use AlarmManger, this is 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 the alarms that I set, what should I do

+6
source share
1 answer

Are you sure you did the research on the nose? Here's what I found in 2 minutes of searching: Android: Install all PendingIntents using AlarmManager

+5
source

Source: https://habr.com/ru/post/896143/


All Articles