![](/img/trans.png)
[英]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.