1

I am trying to use apigee push notifications with Android phonegap app build 3.3.0, PushPlugin. My push notifications sent when the app is in foreground are displayed correctly, but when the app is in background they are not shown.

It looks like the issue is that apigee sends a push with payload that contains "data" property (e.payload.data), instead of "message" property, and since there is no "message" property and that's why android does not display it.

Can you please advise if it is possible to change the payload format of apigee push messages or make the phonegap app to handle "data" in the payload correctly?

Thanks!

4

1 回答 1

0

我不确定电话间隙插件在后台处理方面有多灵活,但是是的,您可以在创建消息以推送到您的设备时提供您想要的任何有效负载。

如果您查看 Apigee 的创建和管理通知文档,您会看到在每个示例中,都有一个可以指定的。如果它是 JSON 对象(而不是字符串),它将“按原样”交付给客户端。换句话说,您可以在通知创建期间指定您的通知程序类似于:

{“消息”:“我的消息”}。

希望有帮助。

于 2014-04-07T16:34:03.423 回答