Мне нужно вот так. Я использовал Accept action. Это работает, когда приложение работает. Но когда я отправляю уведомление, и приложение закрывается, вместо обычного уведомления приходит обычное уведомление.
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, id)
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE)
.setSmallIcon(R.mipmap.ic_manager_launcher)
.setContentTitle(title)
.setContentText(message)
.setAutoCancel(true)
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
.setContentIntent(pendingIntent)
//.setChannelId(id)
//.setSound(sound)
.setAutoCancel(true)
.addAction(R.mipmap.ic_manager_launcher,"Accept",actionIntent)
.addAction(R.mipmap.ic_manager_launcher,"Reject",pendingIntent);
notificationManager.notify(0, notificationBuilder.build());
}
`
![Android Custom Push Notification](https://i.stack.imgur.com/MYhjl.png)