# react-native-check-notification-permission

> Library to check and setting notification react native support both old and new architecture

Latest version **1.0.8** (published 2023-06-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-check-notification-permission
pnpm add react-native-check-notification-permission
yarn add react-native-check-notification-permission
bun add react-native-check-notification-permission
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2023-06-12 |
| First published | 2019-06-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Duong Xuan Nam |
| Maintainers | sieunhandungcam1995 |
| Keywords | react-native, notification-permission, edit-notification, android, ios, turbo module, new architecture |

## Links

- npm: https://www.npmjs.com/package/react-native-check-notification-permission
- Homepage: https://github.com/duongxuannam/react-native-check-notification-permission
- Issues: https://github.com/duongxuannam/react-native-check-notification-permission/issues
- npm.io page: https://npm.io/package/react-native-check-notification-permission

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.8 (latest) — 2023-06-12
- 1.0.7 — 2023-06-12
- 1.0.6 — 2023-06-11
- 1.0.5 — 2019-06-26
- 1.0.4 — 2019-06-25
- 1.0.3 — 2019-06-24
- 1.0.2 — 2019-06-24
- 1.0.1 — 2019-06-24
- 1.0.0 — 2019-06-24

## README

# react-native-check-notification-permission

## Demo 

### iOS

![](https://media.giphy.com/media/MZ9IFFwKaIKr8ujd7w/giphy.gif)

### Android
![](https://media.giphy.com/media/d5Z8krBVjda7kpn7U7/giphy.gif)

### Getting started

The new version support both old and new architecture. Easy example to writing native module support both architectures. Old version is on branch [old-architecture](https://github.com/duongxuannam/react-native-check-notification-permission/tree/nam.duong/old-architecture)

`$ npm install react-native-check-notification-permission --save`

#### Setting to run in old architecture mode 
#### android 
open ``android/gradle.properties`` and update newArchEnabled equal false

``
newArchEnabled=false
``
#### ios

``cd ios && bundle install && bundle exec pod install 
``


#### Setting to run in new architecture mode 

#### ios
``cd ios && bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install 
``
#### android 
open ``android/gradle.properties`` and update newArchEnabled equal true
``
newArchEnabled=true
``
## Usage
```javascript
import {goToNotificationSetting,checkNotificationPermission} from 'react-native-check-notification-permission';

function(){
	...
	const bool = await checkNotificationPermission();
	goToNotificationSetting();
    ...
}
```

## Properties


| Prop   | Type | Result | Description |
| :------------ |:---------------:| :---------------:| :-----|
| checkNotificationPermission  | `func` |`bool` |Get status notification permission. Return `true` if allowed and false if deny
| goToNotificationSetting  | `func` | `void`|Navigate to setting notification screen |

---
_Source: https://npm.io/package/react-native-check-notification-permission · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
