【发布时间】:2021-07-27 22:36:50
【问题描述】:
我有用 Flutter 制作的端到端加密的聊天应用。当推送通知到达时,应用程序对其进行处理,解密内容并显示通知。但问题是,该应用程序未创建另一个未加密内容的通知。它看起来像这样:
这真的很烦人,我不知道如何解决这个问题。 Flutter 日志:
Handling a background message: 0:1620226730325270%0454fd8a0454fd8a
W/FirebaseMessaging(23000): Notification Channel set in AndroidManifest.xml has not been created by the app. Default value will be used.
I/flutter (23000): true
D/FlutterSecureStoragePl(23000): Read: key exists => Running ensureInitStorageCipher
D/FlutterSecureStoragePl(23000): Initializing StorageCipher
D/FlutterSecureStoragePl(23000): StorageCipher initialization complete
D/NotificationSender(23000): Notification created
I/flutter (23000): Notification created
I/flutter (23000): Notification displayed
日志说 AndroidManifest.xml 中设置的通知通道尚未由应用创建。将使用默认值。 但是频道是由应用创建的。 谢谢你的帮助。
顺便说一句,我正在使用 AwesomeNitifications 插件进行通知。
编辑: 应用程序尚未创建 AndroidManifest.xml 中设置的通知通道。将使用默认值。错误不再显示,因为我在 FCM 消息中设置了通知通道 ID 这个 ID,但通知仍然显示两次。
【问题讨论】:
标签: android flutter push-notification notifications firebase-cloud-messaging