L. D. James L. D. James - 1 year ago 88
Android Question

Is There an adb/shell command to list the items on the android's notification bar?

Can someone tell me if there is a way to get the complete list of items currently being displayed in the notification bar? I'm trying to write an interface that will trigger notifications to my PC based on the particular app giving the notification.

My only hits for something similar using the adb cli tool is Receivng push notification using adb shell command which appears to be trying to get the notification from a particular app.

Other references that I am finding are related to actual android programming and sending your own notifications to the bar.

For the sake of formatting, I'm repeating my comment to fRoStBiT who provided the resource in his answer. The following cli provides the specific item:

$ adb shell dumpsys notification | egrep NotificationRecord | awk -F\| '{print $2}'

Answer Source

You can use

adb shell dumpsys notification

It shows detailed information about currently displayed notifications.