简体   繁体   English

当数据库(MySQL)表更改(插入、更新、删除)发生时,如何在 flutter 中获取推送通知?

[英]How to get push notifications in flutter, when database(MySQL) table change (insert, update, delete) occurs?

I know how to create a simple notification in Flutter app, but I want to create a real time push notification whenever database(Mysql) table will update/change.我知道如何在 Flutter 应用程序中创建一个简单的通知,但我想在数据库(Mysql)表更新/更改时创建一个实时推送通知。 I'm using PHP to send/get data from MYSQL database table.我正在使用 PHP 从 MYSQL 数据库表中发送/获取数据。 Is there any way to get notify the user when there is a change/update in database specific table.当数据库特定表发生更改/更新时,有什么方法可以通知用户。

Use Firebase Cloud Messaging https://firebase.google.com/docs/cloud-messaging使用 Firebase 云消息传递https://firebase.google.com/docs/cloud-messaging

You can call the API via PHP.您可以通过 PHP 调用 API。 Here is the example Sending Firebase notification with PHP这是使用 PHP 发送 Firebase 通知的示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM