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
open android/gradle.properties
and update newArchEnabled equal false
newArchEnabled=false
cd ios && bundle install && bundle exec pod install
cd ios && bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
open android/gradle.properties
and update newArchEnabled equal true
newArchEnabled=true
import {goToNotificationSetting,checkNotificationPermission} from 'react-native-check-notification-permission';
function(){
...
const bool = await checkNotificationPermission();
goToNotificationSetting();
...
}
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 |