react-native-check-notification-permission

1.0.8 • Public • Published

react-native-check-notification-permission

Demo

iOS

Android

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

$ 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

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

Package Sidebar

Install

npm i react-native-check-notification-permission

Weekly Downloads

72

Version

1.0.8

License

ISC

Unpacked Size

15.4 kB

Total Files

14

Last publish

Collaborators

  • sieunhandungcam1995