You need to use the cancel(...) method from AlarmManager , using the same PendingIntent that you used to set the alarm. Example:
this.getAlarmManager().cancel(mAlarmPendingIntent);
( this refers to an Activity or Service from which you cancel the alarm).
Here is the link for the API .
Create a PendingIntent as:
mAlarmPendingIntent = PendingIntent.getActivity(this, requestCode, intent, flags);
The doc API for PendingIntent is here .
source share