【问题标题】:I want to send push notification to specific users using PHP and gcm [duplicate]我想使用 PHP 和 gcm 向特定用户发送推送通知 [重复]
【发布时间】:2020-06-26 07:30:23
【问题描述】:

我正在开发一个 Android 项目。 因为我需要根据 MySQL 数据库的条件在后台发送一些通知...... 检查条件后如何使用PHP向某些用户发送通知。

【问题讨论】:

标签: php android mysql


【解决方案1】:

按照以下步骤来实现这一点,

  1. 使用 Firebase SDK 获取设备令牌并将其存储在您的 mysql 数据库中针对用户 (https://firebase.google.com/docs/cloud-messaging/android/client)
  2. 选择符合您的条件的设备令牌(SQL 查询)
  3. 使用 firebase rest api (https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages/send, How can I send a Firebase Cloud Messaging notification without use the Firebase Console?) 将推送消息发送到选定的设备

【讨论】:

    猜你喜欢
    • 2018-07-28
    • 1970-01-01
    • 1970-01-01
    • 2016-02-24
    • 1970-01-01
    • 2017-08-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多