简体   繁体   中英

How to determine if a user has not registered to receive push notifications and/or has their settings disabled

We are sending broadcast push notifications in our hybrid app on MobileFirst 7.1 to the Push.ALL tag. In the app we have a dialog to display the push notification message via WL.client's onMessage listener. We do not want this dialog to open, however, when the user has either not registered to receive push notifications at app install, or later modified their settings to disable push notifications for our app. How can we prevent the onMessage listener from opening the dialog? The listener is firing when the app is opened even if the user has opted out of receiving push notifications.

Push enabled applications automatically subscribe to Push.ALL tag. In case you do not want to ( your user is not registering to push or disables push) , you can unsubscribe from Push.ALL , to prevent broadcast notifications from reaching the specific client.

Use unsubscribeTag(tagname,options) API for this.

More details on the API here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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