mirror of https://github.com/laurent22/joplin.git
parent
78ffc0bc23
commit
a07985da98
|
@ -7,7 +7,7 @@
|
|||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATION" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ import { ChangeEvent, UndoRedoDepthChangeEvent } from '../NoteEditor/types';
|
|||
|
||||
const FileViewer = require('react-native-file-viewer').default;
|
||||
const React = require('react');
|
||||
const { Platform, Keyboard, View, TextInput, StyleSheet, Linking, Image, Share, PermissionsAndroid } = require('react-native');
|
||||
const { Keyboard, View, TextInput, StyleSheet, Linking, Image, Share } = require('react-native');
|
||||
import { Platform, PermissionsAndroid } from 'react-native';
|
||||
const { connect } = require('react-redux');
|
||||
// const { MarkdownEditor } = require('@joplin/lib/../MarkdownEditor/index.js');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
|
@ -807,8 +808,12 @@ class NoteScreenComponent extends BaseScreenComponent {
|
|||
|
||||
public async onAlarmDialogAccept(date: Date) {
|
||||
const response = await checkPermissions(PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS);
|
||||
if (response !== PermissionsAndroid.RESULTS.GRANTED) {
|
||||
logger.warn('POST_NOTIFICATION permission was not granted');
|
||||
|
||||
// The POST_NOTIFICATIONS permission isn't supported on Android API < 33.
|
||||
// (If unsupported, returns NEVER_ASK_AGAIN).
|
||||
// On earlier releases, notifications should work without this permission.
|
||||
if (response === PermissionsAndroid.RESULTS.DENIED) {
|
||||
logger.warn('POST_NOTIFICATIONS permission was not granted');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue