相关疑难解决方法(0)

将Google Play服务更新为自己显示的8.4.0推送通知后

对于推送通知,我们使用GCM(Google云消息传递).当我们使用播放服务时它工作正常:8.3.0.我们使用自己的接收器处理推送通知.升级到com.google.android.gms:play-services:8.4.0 Push后不到我的myGcmListenerService,而是在通知栏中单独显示.它还在Log中显示此错误 GcmAnalytics: Error while parsing timestamp in GCM event.

在8.3.0中,我们收到了这样的推送: Bundle[{gcm.notification.e=1, google.c.a.ts=234343426, gcm.notification.badge=1, gcm.notification.sound=default, gcm.notification.sound2=default, gcm.notification.body=John M @ Cords, Wires And Cable Ftu, gcm.notification.data={"name":"new_chat_message","message_id":490666,"channel_id":5366}, google.c.a.e=1, collapse_key=com.domain.app.debug}]

8.4.0推送就像这样: Bundle[{notification=Bundle[{sound2=default, e=1, body=John M @ Cords, Wires And Cable Rrr, data={"name":"new_chat_message","message_id":490641,"channel_id":5366}, badge=1, sound=default}], collapse_key=com.domain.app.debug}]

android push-notification google-cloud-messaging google-play-services

8
推荐指数
1
解决办法
2137
查看次数

gcm.notification.e=1 代表什么,在 Android 上推送通知有效负载?

我正在编写一个 Android 应用程序,它使用 Google Cloud Messaging 从服务器接收下游消息。当onMessageReceived我收到一条消息时,我打印了这个包并阅读了这个:

RECEIVED PUSH NOTIFICATION: Bundle[{gcm.notification.e=1, gcm.notification.badge=1, gcm.notification.sound=default, ..etc...
Run Code Online (Sandbox Code Playgroud)

我不明白 通知负载中的关键gcm.notification.e。在 Google 文档中,我没有找到类似的内容。此外,在发送消息时,我通常会同时指定通知负载和数据负载。现在我尝试删除通知负载,但我仍然收到 gcm.notification.e=1

有人可以帮助我理解这个键并找到删除它的方法吗?谢谢

编辑:我发现发送没有通知有效负载的消息并且使用content_available=false(我在使用 iOS 时将其设置为 true)然后gcm.notification.e=1未收到。我只收到数据有效负载:)。不过我还是想知道这句话的意思e

notifications android google-cloud-messaging

5
推荐指数
1
解决办法
778
查看次数