简体   繁体   English

Android:从App查找推送通知设置

[英]Android: Find Push Notification Settings from App

有没有一种方法可以从android应用程序确定用户是否已通过设置在应用程序上禁用了推送通知?

I am assuming that flag is to disable "Push Messages" ? 我假设该标志是禁用“推送消息”?

No. 没有。

"Push" is a means of delivering information to a device, initiated by a server, rather than being initiated by a client. “推送”是一种由服务器启动而不是由客户端启动将信息传递到设备的方法。 The most commonly used communications engine for Android that is thought of as "push" is Google Cloud Messaging (GCM). 被认为是“推送”的最常用的Android通信引擎是Google Cloud Messaging(GCM)。

The "Show Notifications" checkbox in Settings controls whether the device should show Notification requests from this app (and, secondarily, whether the app can show a Toast ). 设置中的“显示通知”复选框控制设备是否应显示来自此应用程序的Notification请求(其次,该应用程序是否可以显示Toast )。

While a Notification request can be created as the result of a GCM-style push, they are completely separate things. 虽然可以通过GCM样式的推送来创建Notification请求,但它们是完全独立的。 GCM does not automatically result in a Notification , and few Notification requests have anything to do with GCM. GCM不会自动生成Notification ,并且很少有Notification请求与GCM有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM