当我在应用程序关闭时收到推送通知并单击它时,只打开应用程序,没有任何反应,
它只显示应用程序打开或缩小时的弹出窗口
怎么办?
感谢
答案 0 :(得分:1)
这似乎是产品中的缺陷 - 您需要打开IBM PMR(支持服务单),以便开发团队进行调查并可能提供修复。
答案 1 :(得分:1)
I had the same issue with Worklight 6.2, using Unicast Push Notifications. I think the problem is that the Push Notification Listener gets initialized after the payload is actually processed.
The workaround I found is to force a (even fake) notification subscription after the application connects to the Worklight Server (which means on the success of WL.Client.connect or on the response of the first adapter call).
WL.Client.Push.subscribe("myPush", {
onSuccess : doSubscribeSuccess,
onFailure : doSubscribeFailure
});
Note that this will not work if you are using EventSource based notifications, but only Broadcast, Unicast and Tag. I think you can make it work also with EventSource, but it would be a bit more complicated as you will have to also handle the registration to the event.