如果应用程序被终止,则不会在MI电话中收到GCM推送通知 [英] Not receiving GCM push notification in MI phone if app is killed

查看:99
本文介绍了如果应用程序被终止,则不会在MI电话中收到GCM推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中整合了GCM以接收来自服务器的推送通知。我能够在所有设备(Nexus,Samsung等)中成功接收推送通知,但是,我没有收到我的小米MI手机上的通知。

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.

推荐答案

启动AutoStart

Start AutoStart

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

开始锁定屏幕通知

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

我得到了这个成功..希望它有帮助..

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

这篇关于如果应用程序被终止,则不会在MI电话中收到GCM推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆