I am trying to read the Action
s and RemoteInput
s attached to each StatusBarNotification
in a NotificationListenerService
. However, I want to use the compatibility library for support, so I am trying to get everything as NotificationCompat.Action
and android.support.v4.app.RemoteInput
.
for (StatusBarNotification sbn : NLService.this.getActiveNotifications()) {
Notification notif = sbn.getNotification();
NotificationCompat notifCompat = //?????????????
}
getNotification only returns a Notification
instead of a NotificationCompat
, and I have been very frustrated trying to convert one into the other. I am sure that there is a very simple way to do it, but when I looked at the builder classes and extender classes, I could not find anything.