GCM push notification is not showing in some devices when app is not running

后端 未结 4 1669
甜味超标
甜味超标 2021-02-13 12:00

I am implement GCM Push Notification in my app and its successfully done but in some devices it not show notification when app is close.

List of device which notication

相关标签:
4条回答
  • 2021-02-13 12:27

    I faced similar issue with Redmi-2. There is no problem in the code but it is due to Custom UI provided by the Manufacturer like MIUI 6. So to enable GCM notifications

    Go to Security App >> Tap on permissions >> Tap on Auto Start and enable auto start for your App.

    0 讨论(0)
  • 2021-02-13 12:32

    Facing the same issue, the only things we did are to educate xiaomi users to do the steps as @anup-dasari mentioned, and set the gcm priority to high, with possibility to have persistent service in the future

    0 讨论(0)
  • 2021-02-13 12:42

    There is concept of whitelisting in Xiaomi's phone. So, if you put log in onReceive of gcm, you will notice that gcm is receiving but it's not processing further. Its cause your app is not whitelisted.

    Xiaomi for security purposes disables the Notification for each Application. Follow these steps to receive messages in background once they quit the app using cleaner.

    • Enable Autostart
    • Enable Floating and Lock Screen Notification

    Enable AutoStart

    • Open Security App.
    • Got to Permissions, then Click on Auto Start Management.
    • Add/Enable auto start apps (e.g. Whatsapp).

    Enable Floating and Lock Screen Notification

    • Open Settings App.
    • Click on Notifications, then click on Manage Notifications.
    • Tap on the App which you are looking for (e.g. WhatsApp).
    • Enable Show in notification shade / Show on lockscreen and in drop down option.

    For Reference check this out : http://support.hike.in/entries/55998480-I-m-not-getting-notification-on-my-Xiaomi-Phone-For-MIUI-6-

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

    0 讨论(0)
  • 2021-02-13 12:45

    There are two major reasons for that

    1 - Some devices does not allow you to run a service on background like redmi-2 ( almost on all xiaomi device ). Even whats app could not work properly on them unless user allow them by going to Security App >> Tap on permissions >> Tap on Auto Start and enable auto start for whatsapp etc. In this case all you can do is to show the details of this to user on application start up. And open that screen and guide user ( if possible ) like clean master.

    2- Second reason is that it didn't work on one of those phone whose Google Play Services app wasn't installed correctly(and its essential for GCM). You can not do anything on these devices also. The only thing you can do in this case is just show some message to user about this.

    So from my experience there always be a number of users(but very small percentage) who wont receive GCM push.

    0 讨论(0)
提交回复
热议问题