[英]Not receiving GCM push notification in MI phone if app is killed
I integrated GCM in my project to receive push notification from server. 我在我的项目中集成了GCM以接收来自服务器的推送通知。 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.
我能够在所有设备(Nexus,三星等)中成功接收推送通知,但是,我没有在我的小米MI手机上收到通知。
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.
请帮帮我。
Start AutoStart 启动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.. 我得到了这个成功..希望它有所帮助..
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.