0
votes

There is a free app available on Google's play store which sends push notifications to your phone when certain events occur ("news" events). I would like to be able to somehow store/scrape these notifications and save them to a database.

In the same way that website data can be obtained through http requests or by scraping tools such as selenium, I assume that their must be some structured way in which apps send out push notifications that can be intercepted. (Ideally this would be in Python)

I've tried googling it but I only get results about storing and sending push notifications to apps you have written yourself. Any help/pointers in the right direction/better terminology to google would be appreciated.

1

1 Answers

0
votes

I haven't enought reputation for comment. You could use an android app like Tasker, with the Notification Listener plugin for read the incoming notifications, and Tasker Email Sender to send it to your email, and read and store it with a python email client.

  • Assuming you already have installed Tasker and the two plugins mentioned, open Tasker and click the "+" button on Profiles. Go to "Event" and "Plugin". Select "Notification Listener" and again "Notificacion Listener". You will reach the Configuration page for it. Tap on edit and choose the App or Apps you want to monitor. Tap on the right icon, to visually select them. When you are done, go back and back again, you will be at the profiles area.

  • Tap on "New Task" and choose any name. Tap on "+" for new action, choose "Plugin" and "Tasker Email Sender". Tap con Configuration and add your email settings. In subject and body you can use the variables given by your input, the Notification Plugin.

Here you have an example:

app=%nlapp
title=%nltitle
text=%nltext
ticker=%nlticker
subtext=%nlsubtext
summary=%nlsummary
bigtext=%nlbigtext
info=%nlinfotext

Thats all. Tap back and back to the Profiles screen, and tap on the "ok" icon on the top screen for activate it.

The next notification will be send to your email.