0

我正在使用推送通知来发送本地通知。但是没有事件被触发。我想知道,当应用程序处于前台时,推送事件是否获得了用户,所以我添加了事件监听器:

push = PushNotification.getInstance();
push.sendLocalNotification("sd", new Date().time / 1000 + 10, "title");
push.addEventListener(PushNotificationEvent.NOTIFICATION_RECEIVED_WHEN_IN_FOREGROUND_EVENT, function(e:PushNotificationEvent):void {
    trace(e);
});

4

0 回答 0