Java tutorial
//package com.java2s; //License from project: LGPL import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; public class Main { private static final int ALARM_REQUEST = 105170545; private static final String INTENT_FILTER_NAME = "com.nics.mytreasure.alarm.message"; public static void cancel(Context context) { AlarmManager mAlarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); PendingIntent pintent = PendingIntent.getBroadcast(context, ALARM_REQUEST, new Intent(INTENT_FILTER_NAME), PendingIntent.FLAG_CANCEL_CURRENT); mAlarm.cancel(pintent); } }