简体   繁体   English

Flutter 授权后仍然弹出通知访问界面

[英]Notification access screen keeps popping up even after granting the permission in Flutter

I use flutter_local_notifications plugin and Firebase Messaging library in Flutter on Android 10 and I am only reacting to notifications in the initState method.我在 Flutter on Android 10 中使用flutter_local_notifications插件和Firebase Messaging库,我只对initState方法中的通知做出反应。 I get the data from notification and show the appropriate screen.我从通知中获取数据并显示相应的屏幕。 This works.这行得通。

The problem is that the Notification access screen (screenshot) keeps popping up each time I restart the app, even though I granted all Notification access permissions.问题是每次我重新启动应用程序时,通知访问屏幕(屏幕截图)都会不断弹出,即使我授予了所有通知访问权限。 Does anyone know how to let this screen show just once?有谁知道如何让这个屏幕只显示一次?

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;
     } ....
        

通知访问屏幕

Solved by removing notifications: ^0.0.3 from pubspec.yaml .通过删除notifications: ^0.0.3 pubspec.yaml I did not use this dependency anyway.反正我没有使用这个依赖。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter:主屏幕上 iOS 应用程序图标上的通知徽章计数器未显示(使用 FCM) - Flutter: The notification badge counter on the iOS app icon on the home screen is not showing up (using FCM) Flutter 使用 firestore 弹出屏幕 stream 重新阅读文档 - Flutter does popping a screen with a firestore stream reread the document Terraform 授予对 GCP Bigquery 的访问权限 - Terraform granting access on GCP Bigquery Flutter - 收到 firebase 通知后重定向 - Flutter - Redirect after getting firebase notification flutter 应用程序中将始终出现通知权限弹出窗口 - Notifications permission pop-up will always appear in flutter app “错误:禁止”即使服务帐户具有 function 权限访问 - "Error: Forbidden" even though service account has function permission access 单击推送通知时如何处理 Flutter 中的屏幕导航? - How to handle screen navigation in Flutter when clicking on a Push Notification? 我的服务帐户无法访问 BigQuery 数据,即使它有足够的权限 - My service account is not able to access BigQuery Data even if it have sufficient permission Flutter - 打开应用程序后如何删除 iOS 通知徽章 - Flutter - How to remove iOS notification badge after opening app 在 Visual Studio Code 上调试 Flutter 应用程序时,如何停止 MacOS 上的“钥匙串访问”权限对话框? - How to stop "keychain access" permission dialog on MacOS when debugging Flutter app on Visual Studio Code?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM