fix: ask for granular permission
This commit is contained in:
84
app.json
84
app.json
@@ -1,43 +1,45 @@
|
||||
{
|
||||
"expo": {
|
||||
"name": "Doors Wallpaper",
|
||||
"slug": "doors",
|
||||
"version": "1.0.0",
|
||||
"orientation": "portrait",
|
||||
"icon": "./assets/images/icon.png",
|
||||
"scheme": "doors",
|
||||
"userInterfaceStyle": "automatic",
|
||||
"splash": {
|
||||
"image": "./assets/images/splash.png",
|
||||
"resizeMode": "contain",
|
||||
"backgroundColor": "#010101"
|
||||
},
|
||||
"ios": {
|
||||
"supportsTablet": true,
|
||||
"bundleIdentifier": "art.doorsapp.ios"
|
||||
},
|
||||
"android": {
|
||||
"adaptiveIcon": {
|
||||
"foregroundImage": "./assets/images/adaptive-icon.png",
|
||||
"backgroundColor": "#ffffff"
|
||||
},
|
||||
"package": "art.doorsapp.android"
|
||||
},
|
||||
"web": {
|
||||
"bundler": "metro",
|
||||
"output": "static",
|
||||
"favicon": "./assets/images/favicon.png"
|
||||
},
|
||||
"plugins": [
|
||||
"expo-router"
|
||||
],
|
||||
"experiments": {
|
||||
"typedRoutes": true
|
||||
},
|
||||
"extra": {
|
||||
"eas": {
|
||||
"projectId": "c4413242-8603-45ad-a172-2258cd06190f"
|
||||
}
|
||||
}
|
||||
}
|
||||
"expo": {
|
||||
"name": "Doors Wallpaper",
|
||||
"slug": "doors",
|
||||
"version": "1.0.0",
|
||||
"orientation": "portrait",
|
||||
"icon": "./assets/images/icon.png",
|
||||
"scheme": "doors",
|
||||
"userInterfaceStyle": "automatic",
|
||||
"splash": {
|
||||
"image": "./assets/images/splash.png",
|
||||
"resizeMode": "contain",
|
||||
"backgroundColor": "#010101"
|
||||
},
|
||||
"ios": {
|
||||
"supportsTablet": true,
|
||||
"bundleIdentifier": "art.doorsapp.ios"
|
||||
},
|
||||
"android": {
|
||||
"adaptiveIcon": {
|
||||
"foregroundImage": "./assets/images/adaptive-icon.png",
|
||||
"backgroundColor": "#ffffff"
|
||||
},
|
||||
"package": "art.doorsapp.android",
|
||||
"blockedPermissions": [
|
||||
"android.permission.READ_MEDIA_IMAGES",
|
||||
"android.permission.READ_MEDIA_VIDEO"
|
||||
]
|
||||
},
|
||||
"web": {
|
||||
"bundler": "metro",
|
||||
"output": "static",
|
||||
"favicon": "./assets/images/favicon.png"
|
||||
},
|
||||
"plugins": ["expo-router"],
|
||||
"experiments": {
|
||||
"typedRoutes": true
|
||||
},
|
||||
"extra": {
|
||||
"eas": {
|
||||
"projectId": "c4413242-8603-45ad-a172-2258cd06190f"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,9 @@ export default function WallpaperPage() {
|
||||
setIsDownloading(true);
|
||||
|
||||
try {
|
||||
const permStatus = await MediaLibrary.requestPermissionsAsync();
|
||||
const permStatus = await MediaLibrary.requestPermissionsAsync(true, [
|
||||
"photo",
|
||||
]);
|
||||
if (permStatus.status != MediaLibrary.PermissionStatus.GRANTED) {
|
||||
Alert.alert(
|
||||
"Media library access required",
|
||||
|
Reference in New Issue
Block a user