symfony/firebase-notifier
最新稳定版本:v8.0.0
Composer 安装命令:
composer require symfony/firebase-notifier
包简介
Symfony Firebase Notifier Bridge
关键字:
README 文档
README
Provides Firebase integration for Symfony Notifier.
DSN example
FIREBASE_DSN=firebase://USERNAME:PASSWORD@default
where:
USERNAMEis your Firebase usernamePASSWORDis your Firebase password
Adding Interactions to a Message
With a Firebase message, you can use the AndroidNotification, IOSNotification or WebNotification classes to add
message options.
use Symfony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Bridge\Firebase\Notification\AndroidNotification; $chatMessage = new ChatMessage(''); // Create AndroidNotification options $androidOptions = (new AndroidNotification('/topics/news', [])) ->icon('myicon') ->sound('default') ->tag('myNotificationId') ->color('#cccccc') ->clickAction('OPEN_ACTIVITY_1') // ... ; // Add the custom options to the chat message and send the message $chatMessage->options($androidOptions); $chatter->send($chatMessage);
Resources
统计信息
- 总下载量: 845.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-10