簡體   English   中英

Flutter 授權后仍然彈出通知訪問界面

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM