Reputation: 3251
I'm building an application that's interested in all push notification data from every app on the phone at the time the notifications are in fact pushed.
Is this possible currently within Android?
Upvotes: 0
Views: 283
Reputation: 1007296
First, there are many things that are implementations of "push notifications". While many apps will use Google Cloud Messaging (GCM), others will use their own engines, based on MQTT, long-polls on WebSockets, or whatever.
Second, one app cannot generally spy on another app's network communications, for blindingly obvious privacy and security reasons. To the extent that sort of thing is possible (e.g., via your own VPN implementation), not only does that require the user's participation, but it would not be limited to only push notifications, and it might have problems decrypting the communications.
If, where you write "push notifications", you actually mean "notifications" (e.g., icons in the status bar, raised by apps for asynchronous events such as new email received), a NotificationListenerService
can monitor those. Once again, it requires dedicated user configuration of the app to allow it to monitor notifications.
Upvotes: 1