Closed lklima closed 4 years ago
I have the same problem. @emekalites
You can remove buttons by commenting out the following lines on the file AlarmUtil.java => sendNotification
Intent dismissIntent = new Intent(mContext, AlarmReceiver.class); dismissIntent.setAction(NOTIFICATION_ACTION_DISMISS); dismissIntent.putExtra("AlarmId", alarm.getId()); PendingIntent pendingDismiss = PendingIntent.getBroadcast(mContext, notificationID, dismissIntent, PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Action dismissAction = new NotificationCompat.Action(android.R.drawable.ic_lock_idle_alarm, "DISMISS", pendingDismiss); mBuilder.addAction(dismissAction);
Intent snoozeIntent = new Intent(mContext, AlarmReceiver.class); snoozeIntent.setAction(NOTIFICATION_ACTION_SNOOZE); snoozeIntent.putExtra("SnoozeAlarmId", alarm.getId()); PendingIntent pendingSnooze = PendingIntent.getBroadcast(mContext, notificationID, snoozeIntent, PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Action snoozeAction = new NotificationCompat.Action(R.drawable.ic_snooze, "SNOOZE", pendingSnooze); mBuilder.addAction(snoozeAction);
The buttons will be hidden by default. But if you need them you can pass "has_button: true"
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.
Closed due to inactivity. Holler if this is a mistake, and we'll re-open it.
The buttons will be hidden by default. But if you need them you can pass "has_button: true"
it's not working
The buttons will be hidden by default. But if you need them you can pass "has_button: true"
title: 'my title',
message: 'my message,
schedule_type: 'repeat',
repeat_interval: 'daily,
auto_cancel: true,
has_button: true,
=> has_button is not working
Any solution for this ... How can i add one more button in action buttons ?
First congratulations on the excellent work, it would be interesting to remove or modify the action buttons of the notification. I use this lib to notify a new delivery.