Error in 'react-native-image-picker' launchImageLibrary album (Android 13)

229 Views Asked by At

React-native-image-picker is in use in Android 13 environment. I'm using launchImageLibrary when I need to select an image for an album, but I'm getting an error that all albums don't show up.

The phenomenon does not occur in versions below Android 12, but it is identified as an error that occurs when it changes to photopicker on the way to Android 13 environment. Is there any way to look up all the folders that contain images? I think there is a way to access my file application by displaying 'more' in the image picker, could you tell me if there is a way?

import { launchImageLibrary, launchCamera } from "react-native-image-picker";

...

    const imagePickerOption = {
        mediaType: "photo",
        // maxWidth: 768,
        // maxHeight: 768,
        includeBase64: Platform.OS === "android",
    };

    const onLaunchImageLibrary = () => { //open album
        // @ts-ignore
        launchImageLibrary(imagePickerOption, onPickImage);
    };

I have received permission requests and added all the necessary permissions.

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
0

There are 0 best solutions below