Java tutorial
//package com.java2s; import android.app.AlarmManager; import android.app.PendingIntent; import android.view.View; public class Main { public static void cancelAlarm(View view, AlarmManager mTrunchCheckerAlarm, PendingIntent mPendingCheckerIntent) { if (mTrunchCheckerAlarm != null) { mTrunchCheckerAlarm.cancel(mPendingCheckerIntent); } } }