我是Firebase消息传递方面的新手。现在,我面临着这个问题,即如果推送通知是针对onMessage的,它将正常运行。但是,如果推送通知是针对onResume / onLaunch的,则在我导航到该页面时,它将保持推送状态。我注意到输出是不同的
onLaunch
onLaunch called {notification: {}, data: {owner_name: name,
google.original_priority: high, google.sent_time: 1563813480669,
google.delivered_priority: high, screen: /Nexpage1, title: ASAP,
click_action: FLUTTER_NOTIFICATION_CLICK, message: ALARM!!! Your smoke
detector is detecting fire, google.message_id:
xxxxxx, collapse_key: com.xxxx.xxxxx,
device_name: Kitchen, google.ttl: xxxxx, from: 250525895179}}
onMessage
onMessage called {notification: {title: ASAP, body: ALARM!!! Your smoke
detector is detecting fire}, data: {device_name: Kitchen, screen: /Nexpage1,
title: ASAP, click_action: FLUTTER_NOTIFICATION_CLICK, owner_name: name,
message: ALARM!!! Your smoke detector is detecting fire}}