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
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.
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
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.
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..
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.