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

后端 未结 4 1682
甜味超标
甜味超标 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: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.

提交回复
热议问题