Accessing Notification's RemoteView contents

Viewed 388

I'm trying to list all active notifications on an Android device, by going through their textual fields and extras. For most notifications, that works fine - but for some apps, all these fields (such as title, subtext and so on) are all empty/null. These problematic notifications show empty even on Android's notifications log screen, and in apps like Notification Saver.

For example, see this custom-made notification by ES File Explorer app: enter image description here

I've come to the conclusion that the reason might be that these specific notifications are probably using a custom RemoteView for their contentView (as explained here), without setting the other textual fields. My notification listener could access fields that might be relevant, such as statusBarNotification.getNotification().contentView and statusBarNotification.getNotification().bigContentView, but couldn't find any read/get functions there.

So my question is - can I somehow read the contents of these custom/remote views of a given notification? Perhaps inspect it during runtime? Or if I know a specific viewId that I'm looking for within that view?

0 Answers
Related