aggarwalankush / aggarwalankush/ionic-push-base

Push notification after tapped is clicked not working

未关闭
#10 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
162
派生
64
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。