Here you can find the source of unRegistAlarm(Context context, int code)
public static void unRegistAlarm(Context context, int 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); } }