Python - send notification to Android app after the MySQL database has changed
Where is the row added from ? If from Flask app you can use Signals in Model to send notification when the new row is added
I'm working on a project on pythonanywhere.com and my code in Python (with Flask framework) manages requests of an Android app that wants to access the MySQL database.
The point is that I would like a notification to arrive on the Android smartphone when a row is added to a database table.
If I understand correctly, from Python to Android I can use Firebase Cloud Messaging, but I'm not sure what to use from MySQL to Python: a trigger that calls a script that will send the notification? Or Python listening to the database? Or what else?
Remember that I'm not using personal servers and databases but those offered by the above mentioned domain so I'm not sure I can use everything I want (for example, if I'm not mistaken, it is not possible to implore a UDF).
Thanks in advance!