This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PushNotification from 'react-native-push-notification'; | |
import PushNotificationIOS from '@react-native-community/push-notification-ios'; | |
import { AppState, Platform } from 'react-native'; | |
import { checkNotifications, RESULTS } from 'react-native-permissions'; | |
// BIIIIG WARNING: in iOS you'll get a token ONLY if you request permission for it. | |
// Therefore, a call for PushNotification.requestPermissions() is required. | |
// Android doesn't need the user's consent to send notifications, whereas iOS does | |
// but Android's user can still turn off notifications in the system settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { | |
useState, | |
useEffect, | |
useCallback, | |
useRef, | |
useMemo, | |
} from "react"; | |
import { | |
View, | |
Text, |
OlderNewer