Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Permissions.check for badge, sound or alert notifications individually. #310

Closed
noway opened this issue Jul 3, 2019 · 2 comments
Closed

Comments

@noway
Copy link

noway commented Jul 3, 2019

Describe your environment

  • React-Native version 0.56.0
  • Platform: iOS
  • Device: iPhone 7 Plus
  • OS version: 12.3.1
  • react-native-permissions: 1.1.1
  • Devtools: Xcode

How to repeat issue and example

    const notificationAlertPermission = await Permissions.check('notification', { type: 'alert' })
    const notificationBadgePermission = await Permissions.check('notification', { type: 'badge' })
    const notificationSoundPermission = await Permissions.check('notification', { type: 'sound' })

notificationAlertPermission, notificationBadgePermission and notificationSoundPermission are never the actual alert, badge or sound settings in the iOS settings. I checked the source code of react-native-permissions, and it doesn't look like there's alert, badge and sound specific code for Permissions.check? Only for Permissions.request.

Solution

I think this feature is just missed? Would really appreciate if this would be implemented.

Thanks.

@zoontek
Copy link
Owner

zoontek commented Jul 12, 2019

@noway Indeed, this feature is missing. I add this to the v2 roadmap

@zoontek
Copy link
Owner

zoontek commented Sep 24, 2019

It is now possible: https://github.com/react-native-community/react-native-permissions/tree/2.0.0

@zoontek zoontek closed this as completed Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants