How can I save PendingIntent as an object into Realm, from notificationserviceListener?

508 Views Asked by At

Using NotificationServiceLister, I retrieve the pendingIntent of notification. Now I want to store that pendingIntent as an object, into any offline database like, realm, greendao, sqlite, ormLite, active android etc. Is that possible?? If that possible, then, how??? Or is there any alternative way to find the pendingIntent of any particular notification???

1

There are 1 best solutions below

7
On

Instead of saving the pendingIntent object. You can store the unique notification id into database. And on click of Notification activity would get launch in which you can extract the notification id and see which Notification was clicked by comparing it with your local db.