Add requestPermissions() for push notifications / Local Notifications
See original GitHub issueI’d like to be able to check if the user has granted permission for notifications. This way we tell them to change it in their settings, etc.
Proposed methods
LocalNotifications.checkPermissions()
or
App.checkPermissions()
(returns object of entire app permissions)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Asking Permission to Use Notifications - Apple Developer
Request permission to display alerts, play sounds, or badge the app's icon in response to a notification.
Read more >Notification runtime permission - Android Developers
To request the new notification permission from your app, update your app to target Android 13 and complete a similar process compared to...
Read more >Local Notifications | CodePath iOS Cliffnotes
Step 1: Request Permissions. Add the code below to request permission to send the user notifications. For testing, you can add it in...
Read more >Ask permission for push notification - android - Stack Overflow
I'm working an application and I need to use push notification. I know that push notification are a normal ...
Read more >Notification.requestPermission() - Web APIs - MDN Web Docs
The requestPermission() method of the Notification interface requests permission from the user for the current origin to display ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I went with LocalNotifications.areEnabled(), as it’s not really a permission and the name is closer to the native one.
No, on Android there are no permissions for notifications. If they are disabled, they are disabled, but there is no way for requesting the permission that doesn’t exist, you’ll have to continue prompting with a custom message to tell the users to enabled them.