我的firbaseRemoteMessage有一个包含12个键值对的mBundle,根据调试器,这些字段已填充.但是当我说:remoteMessage.getData();生成的ArrayMapMap大小为0,因此没有元素。如何访问remoteMessage的Map? 最佳答案 我知道这可能会迟到,但您可以从RemoteMessage中的通知对象获取数据Stringtitle=remoteMessage.getNotification().getTitle();Stringbody=remoteMessage.getNotifica
我在我的应用程序中实现了Firebase云消息传递,并且在使用Firebase控制台时,我在Android和iOS中的应用程序收到了我的通知。但是因为我想每天推送通知,所以我创建了一个cron作业来在我的服务器端执行此操作。我注意到每次我触发我的cron时,我的应用程序都会崩溃在我的iOS客户端中,它没有收到任何通知。在我的android客户端中它显示错误:java.lang.Stringcom.google.firebase.messaging.RemoteMessage$Notification.getBody()'在空对象引用上它在我的FirebaseMessagingServi
我按照GoogleSampleshttps://github.com/googlesamples/android-NotificationChannels在Android应用程序中注册了通知channel但是我如何从RemoteMessage获取通知channelId,所以我可以将它设置为NotificationBuilder。publicclassFirebaseMessagingServiceextendscom.google.firebase.messaging.FirebaseMessagingService{@OverridepublicvoidonMessageReceiv