Recent

Author Topic: Camera (on android > 10)  (Read 392 times)

omicron

  • Newbie
  • Posts: 2
Camera (on android > 10)
« on: July 17, 2022, 07:23:38 pm »
Hi,
I'm using CAMERA component in my app, and I can Take photo without any prob on devices android 7, 9 and 10 but I can't Take photo on android 11

permission.WRITE_EXTERNAL_STORAGE and permission.CAMERA gained successfully

- The component call successfully device CAM
- Take a photo appears on the screen of Device CAM

But when I clicked on OK  I get RESULT_CANCELED
 
Just an empty photo test.jpg was stored
it's about changes on Android 11
 

omicron

  • Newbie
  • Posts: 2
Re: Camera (on android > 10)
« Reply #1 on: July 19, 2022, 02:32:51 pm »
According to LOGCAT
Quote
MediaProvider: Permission to access file: /storage/emulated/0/Documents/photos/clients/test.jpg is denied
CAM_StateSavePic: exception while saving result to URI: Optional.of(file:///storage/emulated/0/Documents/photos/clients/test.jpg)
CAM_StateSavePic: java.io.FileNotFoundException: open failed: EACCES (Permission denied)

- permission.WRITE_EXTERNAL_STORAGE and permission.CAMERA gained successfully
- I CAN READ/WRITE any files or new folder into that path !!!
- What I See is the CAM it self "MediaProvider/CAM_StateSavePic" can"t Access and See "test.jpg"

Leledumbo

  • Hero Member
  • *****
  • Posts: 8436
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Camera (on android > 10)
« Reply #2 on: August 10, 2022, 08:57:41 am »
MediaProvider: Permission to access file: /storage/emulated/0/Documents/photos/clients/test.jpg is denied
CAM_StateSavePic: exception while saving result to URI: Optional.of(file:///storage/emulated/0/Documents/photos/clients/test.jpg)
CAM_StateSavePic: java.io.FileNotFoundException: open failed: EACCES (Permission denied)
Add READ_EXTERNAL_STORAGE permission to manifest?

 

TinyPortal © 2005-2018