简体   繁体   中英

Cordova PushPlugin - Can't receive GCM notification on android if app is not running

This is my first message here. I'm using Cordova to develop an web application and I would like to receive Push Notification under Android using GCM.

I tried the this plugin : https://github.com/phonegap-build/PushPlugin I tried the example provided and it's working fine when the app is running : - Received notification is shown inside the app if it's running in foreground - Received notification is shown inside the android notification bar is the app is running in background.

My problem : if I restart my smartphone, or if the app is not running, then I cannot receive any notification. Is there something special to do to display notification in the android notification bar when the application is not running or after the phone restarts ?

Thank you very much for your help.

您的应用中应该有一个广播接收器用于调用通知服务,或者您可以使用此https://github.com/phonegap-build/PushPlugin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM