-4

I need to know when a notification is created because I want to change the audio mode. Is possible?

Thank you very much.

user1242132
  • 9
  • 1
  • 1
  • 6
  • possible duplicate of [Listening for Notification on Android](http://stackoverflow.com/questions/6361148/listening-for-notification-on-android) – CommonsWare Apr 03 '12 at 12:01

2 Answers2

2

With the release of Android 4.3 it is possible to get Notifications within a third-party app. See NotificationListenerService for reference

hnzlmnn
  • 393
  • 2
  • 14
1

You can use Notification class, However an answer on SO, suggests that

There is currently no generic way to intercept Notifications sent from other applications.

However if you want to listen something like SMS notifications than this link can be useful for you..

Community
  • 1
  • 1
Amit
  • 13,134
  • 17
  • 77
  • 148
  • Thank you very much. I want to capture whatssapp notifications to change the audio mode but I see that is impossible. – user1242132 Apr 04 '12 at 06:08