I have a functions to take a picture from the cell phone library, when I run the code the following warning is display:
[Unhandled promise rejection: TypeError: ImagePicker.requestMediaLibraryPermissionsAsync is not a function. (In 'ImagePicker.requestMediaLibraryPermissionsAsync()', 'ImagePicker.requestMediaLibraryPermissionsAsync' is undefined)]
Here are my import
import * as ImagePicker from 'expo-image-picker';
And here are the function:
const pickImage = async () => {
let result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.All,
allowsEditing: true,
aspect: [3, 4],
quality: 1,
});
if (!result.cancelled) {
setImage(result.uri);
}
};