简体   繁体   中英

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. 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 . I did not use this dependency anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM