1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Android: Resolves #2896: Enable sharing to Joplin on Android (#2870)

This commit is contained in:
Roman Musin
2020-06-04 18:40:44 +01:00
committed by GitHub
parent 949c92f6d6
commit 33ad0dce15
13 changed files with 324 additions and 99 deletions

View File

@ -0,0 +1,9 @@
const { PermissionsAndroid } = require('react-native');
export default async (permissions: string) => {
let result = await PermissionsAndroid.check(permissions);
if (result !== PermissionsAndroid.RESULTS.GRANTED) {
result = await PermissionsAndroid.request(permissions);
}
return result === PermissionsAndroid.RESULTS.GRANTED;
};