I am using OneSignal and want to be able to detect current subscribtion state between those three:
OneSignal API gives the isPushNotificationsEnabled
function, but it only detects two states: pushes allowed or not.
I wonder if there's more general (outside of OneSignal API) method to detect that, at least in some browsers.
Solution turned out to be Notification.permission
, which takes three states:
And that's exactly what I needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With