1.0.8 • Published 11 months ago

react-native-check-notification-permission v1.0.8

Weekly downloads
8
License
ISC
Repository
-
Last release
11 months ago

react-native-check-notification-permission

Demo

iOS

npm.io

Android

npm.io

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

PropTypeResultDescription
checkNotificationPermissionfuncboolGet status notification permission. Return true if allowed and false if deny
goToNotificationSettingfuncvoidNavigate to setting notification screen