Unable to get notification content(Notification heading, notification text, subject) using StatusBarNotification (Android)

Viewed 53

I want to get notification content. Like when we receive email, the notification consists of Sender name, Subject and little bit of body. I want to get all these things. So far I'm able to get heading, package name and post time. How to get subject and body in case of email? And in case of whatsapp message like the content of message. It's all there in status bar notification I'm just unable to figure out a way to get this.

https://developer.android.com/reference/android/service/notification/StatusBarNotification

Class encapsulating a Notification. Sent by the NotificationManagerService to clients including the status bar and any NotificationListenerServices.

Tried sbn.getNotification() but no luck.

0 Answers
Related