我在Android设备上的Ionic2项目中实现了Cordova-Plugin-Firebase。我遵循了指南并且它有效。关于函数onNotificationOpen(),如docoftheplugin中所述:Appisinbackground:UserreceivesthenotificationmessageinitsdevicenotificationbarUsertapsthenotificationandtheappopensUserreceivesthenotificationdataintheJavaScriptcallback如果应用程序关闭(不在后台),如果我发送推送