User can disable push notifications in later versions of android for an application, is there any way application can know that push notifications are disabled by user in settings ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Look here: http://developer.android.com/google/gcm/adv.html#unreg
There one way is explained.
Another way could be:
If you have implemented a GCM server then your app sends a message to the server that it does not want any updates anymore.
After that the server deletes the regId from its devices database.
From now on your device should not get any Push Messages.
You could also try to make a client side decision and filter the messages if the user does not want any push messages (that way they would still be sent on the server side)
So I would implement a server side solution. Seems to be the cleanest way for me.