4

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?

Yoav Feuerstein
  • 1,925
  • 2
  • 22
  • 53
  • did you get any solution for this? – Nouman Ch Feb 04 '19 at 12:26
  • @NoumanCh Unfortunately no :( But thanks for the vote-up! – Yoav Feuerstein Feb 04 '19 at 14:59
  • there must be some way become few apps are doing this. – Nouman Ch Feb 04 '19 at 15:38
  • https://play.google.com/store/apps/details?id=co.siempo.phone&hl=en – Nouman Ch Feb 04 '19 at 15:38
  • @NoumanCh are you sure they really are doing what I'm looking for? Or perhaps you only checked with apps that populate the text-based fields behind the scenes? Can you give examples for which apps' notifications are reflected in that app - but can't be read through code (the way I quoted in my original question) please? – Yoav Feuerstein Feb 04 '19 at 16:45
  • you can check by your self dear but what i saw was it was showing even gmail grouped notifications as perfectly as it would be . – Nouman Ch Feb 04 '19 at 16:51
  • Thanks, but this is not what the question is about exactly. Gmail's notifications have all (or at least most) of the data in the regular text fields, like they should be. – Yoav Feuerstein Feb 05 '19 at 20:30

0 Answers0