androidnotificationsadb

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 Receiving push notifications 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}'

Solution

  • You can use

    adb shell dumpsys notification
    

    It shows detailed information about currently displayed notifications.