我正在尝试向设备 xiaomi redmi 1s 发送 GCM 通知,但在向其他设备发送相同的通知时未在设备上收到通知并且消息计数失败为 0。任何人都可以告诉这个问题.我已经调试过它没有收到任何对 onMessage
方法的调用。
not got any message in the app either in the foreground or in the background state of the application, the registration id is correct checked it in IDE.GCM response is "success":2,"failure":0
最佳答案
出于安全考虑,小米禁用了每个应用程序的通知。一旦他们使用清洁器退出应用程序,请按照以下步骤在后台接收消息。
- 启用自动启动
- 启用 float 和锁屏通知
启用自动启动
打开安全应用。
获得权限,然后点击自动启动管理。
添加/启用自动启动应用(例如 Whatsapp)。
启用 float 和锁屏通知
打开设置应用。
点击通知,然后点击管理通知。
点击您要查找的应用程序(例如 WhatsApp)。
启用在通知栏中显示/在锁屏和下拉菜单中显示选项。
引用:http://support.hike.in/entries/55998480-I-m-not-getting-notification-on-my-Xiaomi-Phone-For-MIUI-6-
关于android - 其中一台移动设备未收到 GCM 通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33935521/