I am trying to stop the alarm and checking it whether it stopped or not, but it always returns true means alarm is working. I tried to stop the alarm based on the answer in
Here is my code that i am using to cancel the alarm service
Intent intent = new Intent(this, MyReceiver.class);
PendingIntent sender = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);
AlarmManager alarmManager = (AlarmManager) getApplicationContext().getSystemService(Context.ALARM_SERVICE);
alarmManager.cancel(sender);