-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Clean way to detect "Don't Allow" of push notification permissions on iOS? #202
Comments
@benmcmaster no, there really isn't. The way iOS works is you can check to see if the application has been registered for push notifications or not but there is no way to tell if they haven't yet approved the app for push or if they have denied permission for push. I'll have to have more of a think on it. |
@macdonst yeah, I figured as much. Doing the setTimeout is working ok for me. If registration event never fires I can assume push notifications are not working for that user. |
@macdonst here you find many working concepts how to realize this. |
+1, would be a great addition to the plugin. 😄 |
+1 |
1 similar comment
+1 |
i forked this feature here, only iOS at the moment. it should have < ios8 and >= ios8 support. https://github.com/zwacky/phonegap-plugin-push usage:
|
@zwacky Pull requests are more than welcome. |
will do when i got android ready |
👍 might be a bit slow to respond as I'm off to EU in a few hours on a business trip. |
hi all |
true, @bau720123. although it only covers iOS. pull request: #305 |
@zwacky et al, would it be useful to return sound/alert/badge booleans as well for iOS? It is platform-specific, but probably useful in many developer contexts. |
+1 |
Handled by PR #305 |
Merged into master. |
This thread has been automatically locked. |
Is there a good way to detect if the user denied push notification permissions? (iOS)
In the old PushPlugin I was using a set timeout. Basically if the registration function doesn't come back I assume there was an error. It's hacky. Do we still have to do that? I wish there was a better way.
Here is an example of using a setTimeout in the old PushPlugin:
http://stackoverflow.com/questions/25844812/cordova-how-to-detect-if-push-notifications-are-disabled-on-the-device
The text was updated successfully, but these errors were encountered: