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

378

Solved by removing notifications: ^0.0.3 from pubspec.yaml. I did not use this dependency anyway.

Share:
378
user7289922
Author by

user7289922

Updated on December 27, 2022

Comments

  • user7289922
    user7289922 over 1 year

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

    notification-access-screen