【问题标题】:Flutter notifications not working on android devicesFlutter 通知在 Android 设备上不起作用
【发布时间】:2019-05-06 16:00:57
【问题描述】:

我一直在按照本指南尝试通知,https://medium.com/@nitishk72/flutter-local-notification-1e43a353877b,以及颤振本地通知包的主要 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 设备上进行测试

【问题讨论】:

标签: dart flutter


【解决方案1】:

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

有 Flutter 的 SDK 文档页面:

【讨论】:

    猜你喜欢
    • 2020-01-09
    • 2021-04-06
    • 1970-01-01
    • 2020-09-18
    • 2016-03-22
    • 1970-01-01
    • 1970-01-01
    • 2020-07-03
    • 1970-01-01
    相关资源
    最近更新 更多