You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other push notification libraries give us access to the AuthorizationStatus (or something similar) that allows us to determine if the user has previously seen the permission dialog and accepted/denied notifications, or if they haven't seen them at all.
I need this functionality in my app as I like to show an info card before requesting permissions in the UI.
This is the functionality we have exposed at the moment:
I'm incapable of determining an undetermined state 😄
if (!isRegisteredForPush) {
// is this because they denied access or because they haven't seen the permission dialog yet?
}
if (!permissions.alert && !permissions.provisional) {
// is this because we don't have the necessary permissions, or because they haven't seen the permission dialog yet?
}
Hey @artdevgame, your users will see the dialog only after you'll operate Notifications.registerRemoteNotifications(). So you can know if you did that before, no?
You may save a boolean whether you asked it in a storage like @react-native-community/async-storage.
I think the reason we don't have it is because Android lacks it. But it can be a nice PR someday 😃
Hello 👋🏻
Other push notification libraries give us access to the
AuthorizationStatus
(or something similar) that allows us to determine if the user has previously seen the permission dialog and accepted/denied notifications, or if they haven't seen them at all.I need this functionality in my app as I like to show an info card before requesting permissions in the UI.
This is the functionality we have exposed at the moment:
I'm incapable of determining an
undetermined
state 😄Here's an example of how
@firebase-react-native/messaging
expose it:https://github.com/invertase/react-native-firebase/blob/49d5bedea52683fa98db5f90d3243fe770c4cad5/packages/messaging/lib/index.d.ts#L461
And another from
@react-native-community/push-notification-ios
:https://github.com/react-native-push-notification/ios/blob/88b49f9b548825df9e74ebcf582a9320742c7d54/index.d.ts#L11
I would like it exposed both as a type and const so I can use it both for type-checking and assignment.
The text was updated successfully, but these errors were encountered: