4

我是这里的菜鸟,我刚刚遇到了一个问题。问题是应用程序徽章编号不会在通知到达/收到时显示。

我试过这个:

DeviceEventEmitter.addListener('notificationActionReceived', action => {
  PushNotification.setApplicationIconBadgeNumber(10) // 10 is just to test
});

和这个:

PushNotification.configure({
  ...

  onNotification: function(notification) {
      PushNotification.setApplicationIconBadgeNumber(10) // 10 is just to test
  },

  ...
})

但仍然无法正常工作。

4

0 回答 0