0

i create an application on my android device and i want run it when i receive a pushover notification. After i want passing the notification's text to my app. Is it possible? thanks a lot

Antonio
  • 1,181
  • 4
  • 15
  • 34

1 Answers1

0

You make an application which subscribes to the notifications using

NotificationListenerService in Android 4.3 or Accessiblity Events in older versions of Android. See the following SO Answer for more information.

Also see the following example.

Then in either onNotificationPosted or onAccessibilityEvent your application should triggger your other application to launch using the method described in this SO answer.

This would allow you to start an application when any status bar notification was received from PushOver, and by filtering it to only notifications related to a new pushover notification, you would start an application when a new pushover notification was received.

In order to have the notifications text passed to your application or to filter based on the specific contents of the notification, you would need to subscribe to C2DM pushover messages which is protected by signature level protection, so without consulting the creators of pushover I don't believe that is possible.

Community
  • 1
  • 1
Appleman1234
  • 15,946
  • 45
  • 67