[英]Ionic android push notification works only in background
I'm building an Ionic App which uses push notifications. 我正在构建一个使用推送通知的Ionic应用程序。 I followed the documentation from here .
我从这里开始关注文档。 I can register, I see the token is registered OK, but when I send notifications from ionic , I receive them only if the app is in background.
我可以注册,我看到令牌已注册好,但是当我从ionic发送通知时,仅当应用程序处于后台时,我才会收到通知。 If the app is running, I get no notification .
如果该应用程序正在运行,则不会收到通知。 The event
cloud:push:notification
is not triggered. 未触发事件
cloud:push:notification
。
Any ideas? 有任何想法吗?
Thanks! 谢谢!
Make sure to use the ionic-cloud
library for interfacing with Ionic.io. 确保使用
ionic-cloud
库与Ionic.io进行接口。 The event you mentioned is not triggered by the deprecated ionic-platform-web-clinet
您提到的事件不是由已弃用的
ionic-platform-web-clinet
触发的
http://docs.ionic.io/migration.html#push ` http://docs.ionic.io/migration.html# push`
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.