-1
I’m creating a wallpaper app, but the most important part is the download button I can’t make it work, I’m using Touchableopacity and inside create the function
<TouchableOpacity onPress={
    async () => {
        try {
            const granted = PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE
            if (Platform.OS === "android" && granted === PermissionsAndroid.RESULTS.GRANTED) {
                await CameraRoll.saveToCameraRoll(item);
                alert('foto salva')
            } else {
                console.log("Permissao de camera negada.");
                alert('permissão negada')
            }
        } catch (err) {
            console.warn(err);
        }
}
} style={styles.button}>
    <Text style={styles.buttonText}>Download</Text>
</TouchableOpacity>
this item passed as parameter is the object of the photo itself, when I click the download button it falls in the permission log denied, if someone knows how to solve or has some implementation to save photo in the gallery thank you.