Flutter Android 点击通知无法打开应用程序

问题描述 投票:0回答:1

我在 Flutter 应用程序中使用

firebase_cloud_messaging
,我可以很好地接收通知,但点击它们时,没有任何反应。测试时,该应用程序始终在后台运行。我读到默认情况下,它应该打开该应用程序。我在这里缺少什么?

我是否必须指定某些内容才能打开应用程序?在 iOS 上运行良好。

如果您需要更多信息,请告诉我。

android flutter firebase-cloud-messaging android-notifications
1个回答
0
投票

我错过了以下内容

intent-filter
。添加此选项将使通知打开应用程序。

请参阅此问题了解更多信息。

  <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>
© www.soinside.com 2019 - 2024. All rights reserved.