Home > OS >  Get push notifications when PhpMyAdmin table row changes (Flutter)
Get push notifications when PhpMyAdmin table row changes (Flutter)

Time:02-01

I have created an app like Uber, I want to receive a push notification, when a row changes in PhpMyAdmin database, how can I do it ? I have read that I should use WebSocket in Flutter, but I don't know how to config my server with php, when row changes I get some push notification.

CodePudding user response:

This is a very broad question.
One of the ways to achieve what you want could be the following.

  1. You should look into push notification services like OneSignal, FCM, etc.

  2. Suppose you picked Service A. Now in your backend, whenever you insert a row, send a push notification to the frontend. This can be found in the documentation of Service A.

Something like this if it uses REST APIs:

http.post(
  url: ...
  body: {
   ...
 }
)
  1. In the frontend (flutter), have a listener for this notification (web socket, a client package in pubspec, etc.)
  •  Tags:  
  • Related