gpt4 book ai didi

dart - Flutter通知在Android设备上不起作用

转载 作者:行者123 更新时间:2023-12-03 03:01:48 25 4
gpt4 key购买 nike

我一直在遵循本指南来尝试使用通知,https://medium.com/@nitishk72/flutter-local-notification-1e43a353877b和有关flutter本地通知程序包的主要API文档,但是在较旧的设备上,它始终会出现各种错误,在现代手机上,它只会振动而不会弹出通知(模拟器),我会收到此错误android.app.RemoteServiceException: Bad notification posted from package com.xxx: Couldn't create icon: StatusBarIcon(icon=Icon(typ=RESOURCE pkg=com.xxx id=0x7f040000) visible user=0 )有人可以帮忙吗?

我无法在iOS设备上进行测试

最佳答案

我能够解决将通知服务用作替代方法。我真的推荐OneSignal。它是一个可在多个平台上运行的Notifications Service,最近,他们在OneSignal中添加了Flutter支持。

Flutter有SDK文档页面:

  • Setup Guide for Flutter Project
  • OneSignal for Flutter SDK Docs
  • 关于dart - Flutter通知在Android设备上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56008722/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com