Are push notifications delivered to android phones after its disabled in settings?

試著忘記壹切 提交于 2020-01-04 06:08:53

问题


  • In Android, if we disable app notifications using the OS settings, will fcm/gcm still deliver the notification to the device?

  • If it is delivered to the device will the notification be passed onto the app? or does the OS block it?

  • Is the device_token invalidated?

I am assuming that when we disable notifications, android os communicates these settings to the fcm/gcm server.


回答1:


In Android, if we disable app notifications using the OS settings, will fcm/gcm still deliver the notification to the device?

Yes,

If it is delivered to the device will the notification be passed onto the app? or does the OS block it?

Yes,

Is the device_token invalidated?

No.


"Push Notifications", in terms of FCM/GCM/etc, are a different concept from "App Notifications".

The "Notifications" screen in System Settings is only about what apps are, or are not, allowed to use NotificationManager to pop up notifications in the system tray. That's blocked at the NotificationManager level in the system process, and isn't communicated to the application. Push Notifications can be thought of as simply a specific form of network communication, and that is not tied to whether or not the app is allowed to display a notification in the tray.

GCM will still communicate over the network and deliver push messages to the application, the OS will not block it (the OS, aka Android's system_server, itself actually doesn't get involved in GCM), and your app's device_token will not be invalidated.




回答2:


In Android, if we disable app notifications using the OS settings, will fcm/gcm still deliver the notification to the device?

Yes. The GCM/FCM server doesn't determine if the device has disabled notifications for the corresponding app. So long as the device was targeted for the message, GCM/FCM will deliver the message.

If it is delivered to the device will the notification be pass onto the app? Or does the OS block it?

FCM for Android works differently depending the message payload type you sent. However, depending on the device, usually when Notifications are disabled, regardless of notification type, it would be blocked by the OS.

Is the device_token invalidated?

Nope.

I'm assuming that when we disable notifications, android os communicates these settings to the fcm/gcm server

It doesn't.



来源:https://stackoverflow.com/questions/45720700/are-push-notifications-delivered-to-android-phones-after-its-disabled-in-setting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!