Chore: Add permission request for notifications;
- required on Android 13
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
|||||||
periodReminderObservable,
|
periodReminderObservable,
|
||||||
} from '../local-storage'
|
} from '../local-storage'
|
||||||
import * as PN from 'react-native-push-notification'
|
import * as PN from 'react-native-push-notification'
|
||||||
|
import { requestNotifications } from 'react-native-permissions'
|
||||||
import Moment from 'moment'
|
import Moment from 'moment'
|
||||||
import { LocalDate } from '@js-joda/core'
|
import { LocalDate } from '@js-joda/core'
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ import cycleModule from './cycle'
|
|||||||
import nothingChanged from '../db/db-unchanged'
|
import nothingChanged from '../db/db-unchanged'
|
||||||
|
|
||||||
export default function setupNotifications(navigate, setDate) {
|
export default function setupNotifications(navigate, setDate) {
|
||||||
|
requestNotifications()
|
||||||
const PushNotification = Platform.OS === 'ios' ? PN : PN.default
|
const PushNotification = Platform.OS === 'ios' ? PN : PN.default
|
||||||
|
|
||||||
PushNotification.createChannel({
|
PushNotification.createChannel({
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
"react-native-document-picker": "^8.1.1",
|
"react-native-document-picker": "^8.1.1",
|
||||||
"react-native-fs": "^2.20.0",
|
"react-native-fs": "^2.20.0",
|
||||||
"react-native-modal-datetime-picker": "14.0.0",
|
"react-native-modal-datetime-picker": "14.0.0",
|
||||||
|
"react-native-permissions": "^3.10.0",
|
||||||
"react-native-push-notification": "github:bl00dymarie/react-native-push-notification",
|
"react-native-push-notification": "github:bl00dymarie/react-native-push-notification",
|
||||||
"react-native-share": "^7.9.0",
|
"react-native-share": "^7.9.0",
|
||||||
"react-native-simple-toast": "^1.1.3",
|
"react-native-simple-toast": "^1.1.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user