When the phone receives the notification it will make an object in java called notification and store it in a database. How can I make it so that when a notification comes in the application can read that notification and then make the object?
Asked
Active
Viewed 2,657 times
2
-
This might be helpful https://developer.android.com/reference/android/service/notification/NotificationListenerService.html#getActiveNotifications() – Kamran Gasimov Apr 20 '20 at 19:00
-
Thank you Kamran this really helped! – Shirish Yasa Apr 20 '20 at 20:56
1 Answers
1
To access notifications, you can use the NotificationListenerService. The documents on this is located at: https://developer.android.com/reference/android/service/notification/NotificationListenerService
For the implementation of this class, there has already been discussed within this link: NotificationListenerService Implementation (See the accepted answer for a link to an example)

Joshua Proctor
- 71
- 8
-
-
No problem. Don't forget to accept the answer if you find it acceptable. – Joshua Proctor Apr 23 '20 at 00:48