How to acces and get a list of the user's notifcations

时间:2015-07-28 22:08:57

标签: android android-listview notifications push-notification

I want to create a android launcher but I want to work as a full screen app like the homepage I want to have a custom status bar that when you swipe you can get all the users notification in a custom display design The question here is how can I get all the notifications that the user got

1 个答案:

答案 0 :(得分:0)

If you are on API 18+, this will do

A service that receives calls from the system when new notifications are posted or removed, or their ranking changed.

To extend this class, you must declare the service in your manifest file with the BIND_NOTIFICATION_LISTENER_SERVICE permission and include an intent filter with the SERVICE_INTERFACE action.

https://developer.android.com/reference/android/service/notification/NotificationListenerService.html

NotificationListenerService Implementation