Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70889

Ion-camera Acesso negado

$
0
0

Após todo o processo da função da camera o app retorna o seguinte erro: “Acesso negado”, mesmo após permitir o acesso e além disso não aparece nenhum erro no console além do “No image Selected” que no caso esta retornando. pois, nenhuma imagem foi selecionada.
Print do erro:

Código:

takePicture() {

this.photo = '';

const options: CameraOptions = {

  quality: 100,

  destinationType: this.camera.DestinationType.DATA_URL,

  encodingType: this.camera.EncodingType.JPEG,

  mediaType: this.camera.MediaType.PICTURE,

  allowEdit: true,

  targetWidth: 100,

  targetHeight: 100

}

this.camera.getPicture(options)

  .then((imageData) => {

    let base64image = 'data:image/jpeg;base64,' + imageData;

    console.log(base64image)

    this.photo = base64image;

  }, (error) => {

    console.error(error);

  })

  .catch((error) => {

    console.error(error);

  })

}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>