notification-action

Android Notification Actions with Notification Channeling

情到浓时终转凉″ 提交于 2019-12-24 09:58:57
问题 I am working on an application where we have to generate a notification with action buttons. It was working fine till the date we decided to update our notification handling to support notification channels (released with Android Oreo 8.0). I don't know if this is the reason or there is something missing in our implementation that made notification action buttons unResponsive. Below mentioned is the code snippet... NotificationCompat.Builder localCallNotificationBuilder = new

Show android notification action buttons expanded by default

穿精又带淫゛_ 提交于 2019-12-11 07:42:22
问题 Is there a way to show action buttons in notification expanded by default? I use ongoing notification to control traning process in my app. I want controling buttons such as "Stop" and "Pause" to be visible right after notification appeared in the notification area. 回答1: You can't expand notification. The only solution is, set Priority Max, then the top of the notification list where it would be expanded. And it depends on the device as well. mBuilder.setPriority(Notification.PRIORITY_HIGH)