Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problema permissões de Camera/Storage no Android 10 #26

Open
andremmiller opened this issue Oct 15, 2020 · 0 comments
Open

Problema permissões de Camera/Storage no Android 10 #26

andremmiller opened this issue Oct 15, 2020 · 0 comments

Comments

@andremmiller
Copy link

andremmiller commented Oct 15, 2020

Caso alguém tenha o mesmo problema...

No projeto do Instagram, pra mim não aparecia nada ao selecionar uma foto e a câmera também não abria, apesar de não mostrar nenhum erro.

Usando o console.warn nesse trecho, vi que havia um problema de permissão:
pickImage = () => { ImagePicker.showImagePicker({ title: 'Escolha a imagem', maxHeight: 600, maxWidth: 800 }, res => { console.warn(res) if(!res.didCancel) { this.setState({image: {uri: res.uri, base64: res.data}}) } }) }

error: "/storage/emulated/0/DCIM/Camera/IMG_849.jpg: open failed: EACCES (Permission denied)"

Esse parece ser um problema no Android 10. Solução:

Adicionar esse parâmetro no AndroidManifest.xml, dentro da tag application:
android:requestLegacyExternalStorage="true"

Link de onde busquei a solução:
[https:/react-native-image-picker/react-native-image-picker/issues/1259]

wcaquino added a commit that referenced this issue Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant