Issue while using Polling in IBM Worklight Push Notification

夙愿已清 提交于 2019-12-01 13:32:36
Thejaswini R

The reason for the problem is that your adapter was not successfully deployed. I tried this code and it works fine. Get notifications at the specified interval.

WL.Server.createEventSource({

    name: 'PushEventSource',
    onDeviceSubscribe: 'deviceSubscribeFunc',
    onDeviceUnsubscribe: 'deviceUnsubscribeFunc',
    securityTest:'PushApplication-strong-mobile-securityTest',
    poll: {
        interval : 3,
        onPoll: 'getNotificationsFromBackend'
    }   
});


function getNotificationsFromBackend() {

    WL.Logger.debug("hi");
    submitNotification("User1","This is Poll Notification");
}

The problem with your adapter code seems to be missing quotes for the function name for onPoll parameter.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!