Permission Camera Roll Error React Native

twitter logo github logo ・1 min read

Am trying to access camera roll on my react native app and it not giving back feedback

This my code

onImageUpload = async () => {
const {status: cameraRollPerm} = await PermissionsAndroid.askAsync(
PermissionsAndroid.PERMISSIONS.CAMERA_ROLL,
try{
if (cameraRollPerm === 'granted') {
let pickerResult = await ImagePicker.lauchImageAsync({
allowsEditing: true,
aspect:[4,3]
});
console.log(
'ready to upload... pickerResult json:'+ JSON.stringify(pickerResult)
);

I tried

await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.CAMERA,

twitter logo DISCUSS (2)
markdown guide
 

Please wrap your code in triple backticks (`), three on the line above the code, and three below. Otherwise, this isn't readable. :(

 
Classic DEV Post from Feb 13

How Do I Start Giving Talks on Coding?

I don't consider myself an expert in just about any aspect of computer science ...

Emmanuel Oreoluwa profile image
< NEWBIE />