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???
Asked
Active
Viewed 481 times
2

Abir Hossain
- 111
- 7
-
I think.. you should give the whole use case (with screenshots) for which you want to get a solution and saving pendingIntent is not the problem that will provide you the solution. – Asad Oct 16 '17 at 12:20
-
got solution brother? – Amin Pinjari Apr 08 '20 at 19:21
1 Answers
0
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.

Nilesh Deokar
- 2,975
- 30
- 53
-
Can you please tell me, how can I find the pendingIntent from notification id?? it would be so helpful to me :) – Abir Hossain Oct 13 '17 at 16:40
-
1Could you please tell me how exactly you are going to use pendingIntent ? Any use case? – Nilesh Deokar Oct 13 '17 at 19:48
-
I want to save statusBarNotification stuffs like, title, message, ticker, icon, pendingIntent in offline database. Then, show it in a list. And then, when user tap on the each item, I want to sent him/her, to the pendingIntent, which i saved in offline database for every notification. – Abir Hossain Oct 14 '17 at 07:52
-
1
-
-
So you are the one who is creating the `pendingIntent` then why not to save it's data before creating a `notification`. – Nilesh Deokar Oct 14 '17 at 08:43
-
But the problem is, I am not creating the pendingIntent. I just retrieve the pendingintent of all notification which come to phone by notificationServicelistener. – Abir Hossain Oct 14 '17 at 09:18