ESP RainMaker Customer Docs

ESP RainMaker Customer Docs

  • 入门指南
  • 发布版本
  • 帮助

›RainMaker 云

介绍

  • 介绍

RainMaker 云

  • RainMaker 云
  • 准备工作
  • 部署前配置
  • 部署
  • 后端
  • 节点注册模块
  • 前端部署
  • 部署后配置
  • 部署验证
  • 获取许可证
  • 附加服务
  • 推送通知
  • 部署升级
  • 配置
  • 卸载

手机应用

  • 安卓配置
  • iOS 配置
  • 通知 Payload

CLIs

  • CLI

固件

  • 固件

第三方登录

  • 谷歌登录
  • 苹果登录

集成

  • 语音助手集成
  • Alexa
  • 谷歌语音助手
  • 语音助手集成插件仓库
  • Alexa 账号关联
  • 发布 Alexa Skill
  • 发布谷歌语音助手 Action
  • 升级

功能

  • 功能

监测

  • 监测面板

参考

  • 参考

推送通知服务

[English Version]

推送通知 (Push Notifications) 服务用于向用户发送有关 RainMaker 的事件通知。在安卓和 iOS 中使用这一服务分别需要在通知设置中配置 FCM 和 APNS 环境。

在安卓中配置推送通知服务

  1. 为安卓应用配置推送通知服务,请参阅 推送通知设置。

  2. 前往 Firebase 控制台 选择您的项目。在左侧导航栏中点击齿轮图标,然后选择 Project settings。

    firebase8

  3. 点击 Service accounts,在 Firebase Admin SDK 下,点击 Generate new private key,
    下载一个包含所有项目信息(包括私人密钥 Private Key)的文件。

![firebase9](/img/firebase9.png)
  1. 用管理员账户登录 RainMaker 管理面板。打开 Deployment Settings > Push Notifications。

    push_notification12

  2. 创建新的平台应用程序。选择类型为 Google Notification。

    push_notification13

  3. 输入步骤 3 下载的文件中 Private Key 字段的内容,点击 Save。

    push_notification14

  4. 现在可以启用推送通知服务了,具体启用步骤请参阅 启用通知推送。


在 iOS 中配置推送通知服务

  1. 登录苹果开发者账户。

    push_notification1

  2. 启用此服务需要用 App ID。若尚未创建,请前往 Apple Developer 控制台创建新账号,具体步骤请参阅 创建 App ID。

  3. 打开 Certificates 一栏,点击 +。

    push_notification2

  4. 为推送通知服务创建新的证书,请选择 Apple Push Notification service SSL (Sandbox & Production) 并点击 Continue。

    push_notification3

  5. 选择应用程序的 App ID 并点击 Continue。

    push_notification4

  6. 接下来需要创建 Certificate signing request (CSR)。

    push_notification5

  7. 打开 Keychain Access 工具栏,选择 Certificate Assistant > Request a certificate from a Certificate Authority。

    push_notification6

  8. 在 Certificate Assistant 对话框中,找到 User Email Address 一栏并输入电子邮件地址,CA Email Address 一栏无需填写。选择 Saved to disk 并点击 Continue 以保存证书。

    push_notification7

  9. 上传 CSR。

    push_notification8

  10. 证书已经成功创建,可以使用 Keychain Access 下载并查看。

    push_notification9

  11. 从 Keychain Access 导出证书,格式为 p12。

    push_notification10

    无需设置密码来保护导出的证书。

    push_notification16

  12. 启动通知推送需要 SSL Certificate 和 Private Key。 使用以下命令可获取 SSL Certificate。

    openssl pkcs12 -in yourP12Certificate.p12 -clcerts -nokeys

    使用以下命令可获取 Private Key。

    openssl pkcs12 -in yourP12Certificate.p12 -nocerts -nodes

  13. 用管理员账户登录 RainMaker 管理面板。打开 Deployment Settings > Push Notifications。

    push_notification12

  14. 创建新的平台应用程序,选择类型为 Apple Notification (APNS)。

    push_notification13

  15. 将步骤 12 中获取的 SSL Certificate 和 API Key 粘贴至此处,点击 Save。

    push_notification11

    注意 - 该证书也可用于沙盒和生产环境。沙盒环境用于测试通知和调试,APNS 用于分发。您可以重复步骤 13 和 14,选择类型为 APNS_SANDBOX,为沙盒环境设置推送通知。

  16. 现在可以启用推送通知服务了,具体启用步骤请参阅 启用通知推送。

启用通知推送

  1. 用管理员账户登录 RainMaker 管理面板。打开 Deployment Settings > Push Notifications。

    push_notification12

  2. 使用切换键启用推送通知。您可以自定义启用推送通知的事件。

    push_notification15

    注意 - 使用同样的切换键也可以禁用推送通知。

← 附加服务部署升级 →
  • 在安卓中配置推送通知服务
  • 在 iOS 中配置推送通知服务
  • 启用通知推送
Copyright © 2024 Espressif Systems