简体   繁体   English

worklight android推送通知设备设置?

[英]worklight android push notification device settings?

I am creating push notification for Android & IOS by using Worklight. 我正在使用Worklight为Android和IOS创建推送通知。 If the user manually changes the push notification settings in mobile, how to get the action/value in worklight. 如果用户在移动设备中手动更改推送通知设置,则如何在Worklight中获取操作/值。

When the user switch-on/off the notification then how to handle the action in Worklight? 当用户打开/关闭通知时,如何在Worklight中处理操作?

Any code help please share. 任何代码帮助请分享。

You can get the state of these controls, at least in the case of iOS, by querying UIApplication > enabledRemoteNotificationTypes (you will likely need to create a Cordova plug-in to access this using Objective-C). 至少在iOS中,可以通过查询UIApplication> enabledRemoteNotificationTypes来获取这些控件的状态(您可能需要创建一个Cordova插件才能使用Objective-C来访问此控件)。

In Android I do not believe such granularity exists out of the box. 在Android中,我认为这种粒度并不存在。

There is nothing to handle here, IMO. IMO,这里没有什么要处理的。 If a user chose to not receive notifications for the application or receive them as an alert instead of a notification or only as a sound - that is his or hers prerogative. 如果用户选择不接收该应用程序的通知,或者将其作为警报而不是通知或仅作为声音来接收,则这是他或她的特权。 You shouldn't do anything about it. 您不应该对此做任何事情。

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

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