[英]Flutter: The notification badge counter on the iOS app icon on the home screen is not showing up (using FCM)
[英]Notification access screen keeps popping up even after granting the permission in Flutter
我在 Flutter on Android 10 中使用flutter_local_notifications
插件和Firebase Messaging
库,我只对initState
方法中的通知做出反应。 我从通知中获取数据并显示相应的屏幕。 这行得通。
问题是每次我重新启动应用程序时,通知访问屏幕(屏幕截图)都会不断弹出,即使我授予了所有通知访问权限。 有谁知道如何让这个屏幕只显示一次?
final m = FirebaseMessaging();
@override
void initState() {
super.initState();
m.configure(
onMessage: (Map<String, dynamic> m) async {
// method call is here and works
return;
},
onResume: (Map<String, dynamic> m) {
// method call is here and works
return;
} ....
通过删除notifications: ^0.0.3
pubspec.yaml
。 反正我没有使用这个依赖。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.