【发布时间】:2020-08-26 05:58:00
【问题描述】:
当我收到来自 FCM 的通知时,我需要启动一个特定的屏幕,而应用程序被杀死/来自本机的背景我看到了这个链接 Launch screen from native background service 但我做不到,请帮忙。
【问题讨论】:
当我收到来自 FCM 的通知时,我需要启动一个特定的屏幕,而应用程序被杀死/来自本机的背景我看到了这个链接 Launch screen from native background service 但我做不到,请帮忙。
【问题讨论】:
我遇到了这个问题,我通过将"click_action": 'FLUTTER_NOTIFICATION_CLICK' 添加到我的云功能中的数据有效负载来修复它。然后在我的 android/app AndroidManifest.xml 中,在我添加的 <activity> 标签内:
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
【讨论】: