public void removeNotification(int groupPosition) { SimpleNotification n = notifications.get(groupPosition); notifications.remove(n); adapter.notifyDataSetChanged(); Context context = getApplicationContext(); new NotificationsAlarmManager(context).removeAlarm(context, n); }
public void editNotification(int location) { SimpleNotification n = notifications.get(location); Context context = getApplicationContext(); Intent i = new Intent(context, CreateSimpleNotificationActivity.class); i.putExtra(CreateSimpleNotificationActivity.FLAG, CreateSimpleNotificationActivity.EDIT); i.putExtra(CreateSimpleNotificationActivity.EDITING_NOTIFICATION, n); i.putExtra(CreateSimpleNotificationActivity.ID, n.getId()); startActivityForResult(i, REQUEST_CODE_EDIT); }