Reputation: 10772
I'd like to determine if push notifications were disabled by a user using React Native with PushNotificationIOS.
PushNotificationIOS
has the method checkPermissions
, but this method only tells me whether notifications are enabled.
I would like, using React Native, to tell if my app prompted the user to enable notifications and the user denied the permission, or if the user independently went to settings and disabled notifications.
In native code, you'd use UNUserNotificationCenter
and check getNotificationSettings
for authorizationStatus
with value .denied
.
Thanks.
Upvotes: 11
Views: 7482
Reputation: 196
I can suggest to you try this library. This library have all features that you mention above. For me it's work great, hope for you too.
Upvotes: 4