Android Alarm Cancel cancelAlarmManager(Context context, PendingIntent pendingIntent)

Here you can find the source of cancelAlarmManager(Context context, PendingIntent pendingIntent)

Description

cancel Alarm Manager

Declaration

public static void cancelAlarmManager(Context context,
            PendingIntent pendingIntent) 

Method Source Code

//package com.java2s;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;

public class Main {
    public static void cancelAlarmManager(Context context,
            PendingIntent pendingIntent) {
        AlarmManager alarmManager = (AlarmManager) context
                .getSystemService(Context.ALARM_SERVICE);
        pendingIntent.cancel();/*ww w  . java 2 s. c o  m*/
        alarmManager.cancel(pendingIntent);
    }
}

Related

  1. cancelAlarm(Context context, int index, String action)
  2. cancelAlarm(PendingIntent intent, Context context)
  3. cancel(Context context, Intent broadcastIntent, int requestCode)
  4. cancelAlarm(Context context, Class clazz, int flags)
  5. unsetAlarm(Context context, Intent intentBroadcast)
  6. unsetAlarm(Context context, PendingIntent pendingIntent)