react native (native module) notifications utils, for making notifications easier
npm install react-native-notifications-utilsreact-native-notifications-utilssh
yarn add react-native-notifications-utils
`$3
`sh
cd ios && pod install
`
Usage
`typescript
import NotificationsUtils from "react-native-notifications-utils";// ...
NotificationsUtils.openSettings();
`API
$3
API used to open the Platform specific System settings for the application.| Parameter | Type | Description | Android | iOS |
| --------- | -------- | ------------------------------------------------------------------------------------------- | ------- | --- |
| channelId |
string | The channel id to open the settings for. If not provided, the default channel will be used. | ✅ | ❌ |- On Android:
- API version is >= 26 with
channelId will open the channel settings. if channelI is not provided, the app's notification settings will be opened.
- API version is < 26, the application settings screen is opened- On iOS:
- If the version of iOS is >= 15.4, the app's notification settings screen is displayed.
- If the version of iOS is < 15.4, the app's settings screen is displayed.
- for further details, see:
- Apple's iOS 16 documentation for
openNotificationSettingsURLString
- Apple's iOS 15.4 documentation for UIApplicationOpenNotificationSettingsURLString
- Apple's documentation for openSettingsURLString`.See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
---
Made with create-react-native-library