使用cordova插件jpush-phonegap-plugin,在js中监听jpush.receiveNotification和jpush.openNotification没有反应

fu_p
2018-09-10 11:27 1.4k 0
  document.addEventListener('jpush.receiveRegistrationId', function (event) {
    alert('receiveRegistrationId' + JSON.stringify(event));
  }, false)
  initiateUI();
  document.addEventListener("jpush.receiveNotification", function (event) {
    //do something
alert('111');
  }, false)
  document.addEventListener("jpush.openNotification", function (event) {
    //do something
alert('111');
  }, false)

获取receiveRegistrationId的方法正常,推送也正常,但是无法进去监听jpush.receiveNotification和jpush.openNotification方法

1个回答

热门排序
  • 1、提供使用插件的版本号

    2、提供客户端日志信息,从初始化开始提供

    3、使用插件 demo 尝试一下