Skip to content

Added support for checking if lockScreen and notificationCenter settings are enabled #142

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

Conversation

alexhernandez
Copy link
Contributor

@alexhernandez alexhernandez commented Jul 2, 2020

Summary

I was working on a project and needed access to know if notifications were enabled for lockScreen and notificationCenter when firing checkPermissions().

Test Plan

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

To test fire checkPermissions() and you should get an updated object that includes lockScreen and notificationCenter.

Alternatively, you can also run the /example and press "show enabled permissions".

Before this commit:

{
    "alert": true,
    "badge": true,
    "sound": true,
}

After commit:

{
    "alert": true,
    "badge": true,
    "sound": true,
    "lockScreen": true, 
    "notificationCenter": true,
}

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)

Copy link
Collaborator

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexhernandez Thanks so much!

@Naturalclar Naturalclar merged commit 947b300 into react-native-push-notification:master Jul 4, 2020
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

Successfully merging this pull request may close these issues.

3 participants