I'm using the NotificationListenerService
to read the notification posted on the status bar. I'm able to read the title and text on the notifications , but couldn't find a way to read the actions and content intent set to the notification.
In your onNotificationPosted(), you have access to the StatusBarNotification. With that, you can call getNotification() and then use the public member variables contentIntent and actions to access the content intent and actions, respectively.
@Override
public void onNotificationPosted(StatusBarNotification sbn) {
Notificiation notification = sbn.getNotification();
PendingIntent contentIntent = notification.contentIntent;
Actions[] actions = notification.actions;
}