How to close notification bar in android programmatically?
You can programmatically close the notification drawer by broadcasting an ACTION_CLOSE_SYSTEM_DIALOGS intent. This causes "temporary system dialogs" to be dismissed.
Can Android See Notification history?
Enable and check notification history on Android
Find and open the Settings app (it looks like a gear icon). Open Notifications. Select Notification history. Enable the Use notification history toggle from the following menu.