aggarwalankush / aggarwalankush/ionic-push-base

Push notification after tapped is clicked not working

Đang mở
#10 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
162
Fork
64
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello All,
I’m working with push notifications in one of my Ionic 2 Application.

Just stucked when the app is not running in the foreground that means when the app is closed and push notification triggers, its showing up properly but when its tapped the application starts up but the code after push is not working :s

pushObject.on(‘notification’).subscribe((data: any) => {

console.log(‘Data returned’, data);
//if user using app and push notification comes
if (data.additionalData.foreground) {
console.log(“app is running”);
} else {
//if user NOT using app and push notification comes
//TODO: Your logic on click of push notification directly
console.log(‘Push notification clicked’, data);
}
});

I’m unable to see this ‘Push notification clicked’ log, how to check my after push code is working properly?

Any help will be highly appreciated!

Thanks.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.