DEV Community

Emmanuel Oreoluwa
Emmanuel Oreoluwa

Posted on

2 1

Permission Camera Roll Error React Native

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,

Top comments (2)

Collapse
 
codemouse92 profile image
Jason C. McDonald

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

Collapse
 
aore profile image
Emmanuel Oreoluwa

Done

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay