tags:

views:

30

answers:

0

I have app which reminds people to so their task. So there is one pending intent,now the user can delete the alram when he wants to. Ib this code there is just one pending intent for multiple user alarms so I am confused on cancelling that particular alarm where extras is "pill". The remaining alarms should not be cancelled .I have no clue on this problem. Hope i am clear. Thanks

Intent intent = new Intent(this, AlarmNotifyReceiver.class);
intent.putExtra("Name_pill", "pill");
sender = PendingIntent.getBroadcast(this,
DatabaseConstants.NOTIFICATION_ID + 1, intent,
PendingIntent.FLAG_UPDATE_CURRENT);
AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
am.set(AlarmManager.RTC_WAKEUP,cal.getTimeInMillis(), sender);
updateTheFlag(pillName[(pillName.length-1)]);