ЛОКАЛЬНОЕ ФЛАТТЕР-ОПОВЕЩЕНИЕ FIREBASE-ОБМЕН СООБЩЕНИЯМИ

# #flutter #push-notification #firebase-cloud-messaging #payload #localnotification

Вопрос:

Я столкнулся с проблемой, когда я использую локальный пакет уведомлений flutter с FCM для обработки уведомлений, когда пользователь нажимает на уведомление, оно должно вызвать функцию «onSelectNotification» и выполнить ее, но ничего не произошло, и откройте приложение как обычно …Мне нужно перейти на пользовательскую страницу, зависит от полезной нагрузки уведомления, но она просто открывает приложение

мой андроидный кулак

 package="xxxx"gt;  lt;uses-permission android:name="android.permission.INTERNET"/gt;  lt;queriesgt;  lt;!-- If your app opens https URLs --gt;  lt;intentgt;  lt;action android:name="android.intent.action.VIEW" /gt;  lt;data android:scheme="https" /gt;  lt;/intentgt;  lt;!-- If your app makes calls --gt;  lt;intentgt;  lt;action android:name="android.intent.action.DIAL" /gt;  lt;data android:scheme="tel" /gt;  lt;/intentgt;  lt;!-- If your app emails --gt;  lt;intentgt;  lt;action android:name="android.intent.action.SEND" /gt;  lt;data android:mimeType="*/*" /gt;  lt;/intentgt;  lt;/queriesgt;  lt;application  android:label="xxx"  android:icon="@mipmap/ic_launcher"  android:usesCleartextTraffic="true"gt;  lt;activity  android:name=".MainActivity"  android:launchMode="singleTop"  android:theme="@style/LaunchTheme"  android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"  android:hardwareAccelerated="true"  android:windowSoftInputMode="adjustResize"gt;  lt;!-- Specifies an Android theme to apply to this Activity as soon as  the Android process has started. This theme is visible to the user  while the Flutter UI initializes. After that, this theme continues  to determine the Window background behind the Flutter UI. --gt;  lt;meta-data  android:name="io.flutter.embedding.android.NormalTheme"  android:resource="@style/NormalTheme"  /gt;  lt;meta-data  android:name="io.flutter.embedding.android.SplashScreenDrawable"  android:resource="@drawable/launch_background"  /gt;  lt;intent-filtergt;  lt;action android:name="android.intent.action.MAIN"/gt;  lt;category android:name="android.intent.category.LAUNCHER"/gt;  lt;/intent-filtergt;  lt;intent-filtergt;  lt;action android:name="FLUTTER_NOTIFICATION_CLICK" /gt;  lt;category android:name="android.intent.category.DEFAULT" /gt;  lt;/intent-filtergt;  lt;!-- Displays an Android View that continues showing the launch screen  Drawable until Flutter paints its first frame, then this splash  screen fades out. A splash screen is useful to avoid any visual  gap between the end of Android's launch screen and the painting of  Flutter's first frame. --gt;  lt;meta-data  android:name="io.flutter.embedding.android.SplashScreenDrawable"  android:resource="@drawable/launch_background"  /gt;   lt;/activitygt;  lt;!-- Don't delete the meta-data below.  This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --gt;  lt;meta-data  android:name="flutterEmbedding"  android:value="2" /gt;  lt;meta-data  android:name="com.google.firebase.messaging.default_notification_icon"  android:resource="@drawable/notification_icon_push" /gt;  lt;meta-data  android:name="com.google.firebase.messaging.default_notification_color"  android:resource="@android:color/transparent" /gt;  lt;meta-data  android:name="com.google.firebase.messaging.default_notification_channel_id"  android:value="high_importance_channel" /gt;  lt;/applicationgt; lt;/manifestgt;```    ====================================== flutter doctor   `Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 2.0.2, on Microsoft Windows [Version 10.0.19042.1288],  locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [√] Android Studio (version 4.1.0) [√] VS Code (version 1.60.2) [√] Connected device (3 available)  • No issues found!`    packages versions :  firebase_core: ^0.7.0  firebase_messaging: ^8.0.0-dev.14  flutter_local_notifications: ^4.0.1 2