Not receiving GCM push notification in MI phone if app is killed

僤鯓⒐⒋嵵緔 提交于 2019-12-21 04:51:21

问题


I integrated GCM in my project to receive push notification from server. I am able to successfully receive push notification in all the devices (Nexus, Samsung etc), however, I am not receiving notifications on my Xiaomi MI phone.

When the app is running or is in background then I am receiving notification however if I kill the app (by swiping the app away from recent apps) then I don't receive any notification.

In pre-installed Security app there is an Auto-Start feature. Some apps have this auto-start feature turned ON and some don't. My app have this auto-start feature turned OFF. If I turn auto-start ON for my app then I start receiving notifications even if I kill the app.

How can I fix this issue? Please help me out.


回答1:


Start AutoStart

Open Security App -> Permissions -> Auto Start Management.
Add/Enable your app as auto start apps

Start Lock Screen Notification

Open Settings App -> Notifications - Manage Notifications.
Tap on your App and select all cases.

i got success with this.. Hope it helps..



来源:https://stackoverflow.com/questions/34104161/not-receiving-gcm-push-notification-in-mi-phone-if-app-is-killed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!