Android Alarm Cancel unRegistAlarm(Context context, int code)

Here you can find the source of unRegistAlarm(Context context, int code)

Description

un Regist Alarm

Declaration

public static void unRegistAlarm(Context context, int code) 

Method Source Code

//package com.java2s;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

public class Main {
    public static void unRegistAlarm(Context context, int code) {
        Intent intent = new Intent();
        PendingIntent sender = PendingIntent.getBroadcast(context, code,
                intent, 0);/*  w  ww  .  j av a  2s. c  o m*/

        AlarmManager manager = (AlarmManager) context
                .getSystemService(Context.ALARM_SERVICE);

        manager.cancel(sender);
    }
}

Related

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