flutter - 令人敬畏的 fcm 推送通知
问题描述
我在某些时候迷路了,我试图弄清楚如何在这里使用这个插件插件 应该用什么来回复这个:
这在 fcm 上工作得很好,但我正试图从 fcm 切换,因为像 whatsApp 这样的回复
FirebaseMessaging.onMessage.listen
FirebaseMessaging.onMessageOpenedApp.listen
FirebaseMessaging.instance
.getInitialMessage()
.then((RemoteMessage message) {
});
解决方案
您可以使用操作按钮:
AwesomeNotifications().createNotification(
content: NotificationContent(
id: 10,
channelKey: 'basic_channel',
title: 'Action button title',
body: 'Simple body',
),
actionButtons: [
NotificationActionButton(
key: "REPLY",
label: "Reply",
autoCancel: true,
enabled: true,
buttonType: ActionButtonType.InputField,
icon: "resource://drawable/logo"),
],
);
推荐阅读
- c - 用 C 点击网页上的按钮
- java - 变量“j”无法解析为变量 - 二维数组
- swift - DJI Onboard-SDK 到 Mobile-SDK 通信:移动端使用 swift 的问题
- java - Android项目中的Gradle错误
- c++ - C++ std::map 内存泄漏
- html - 我想将我的用户限制为 xxx.xx 格式。我是正则表达式的新手,哪个表达式可以做到这一点?
- python - 如何在 Python 中找到 CSV 文件中的最大数据点?
- amazon-web-services - 从 VPC / Lambda 访问 Parameter Store
- node.js - Nodejs - 对一次返回 Promise 的函数进行大量“X”次调用
- html - 如何垂直对齐 div 并添加直角三角形?