Delete alarm from AlarmManager using cancel() - Android
I'm trying to create and delete an alarm in two different methods which are both called at different moments in the application logic. However when I call AlarmManager's cancel() method, the alarm isn't deleted. Here's my addAlarm() Method : AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); Intent intent = new Intent(PROX_ALERT_INTENT); intent.putExtra("ALERT_TIME", alert.date); intent.putExtra("ID_ALERT", alert.idAlert); intent.putExtra("TITLE", alert.title); intent.putExtra("GEO_LOC", alert.isGeoLoc); PendingIntent pendingIntent = PendingIntent