160
Views
4
Comments
Solved
[CameraPreview Plugin] Camera Permission 
Question
camerapreview-plugin
Mobile icon
Forge asset by Daniel Martins

Good morning, when I give permission to use the camera the background stays black. I need to close the app and open it again. Anyone knows a solution for this problem?

2019-03-07 09-58-19
Joel Simoes
Solution

Hi Diogo


I also had this problem, what I did was:

Before calling the StartCameraPreview or the GetDeviceSize, I'm checking if the app has permission to use the Camera, if true I show a block where I have all the logic (StartCameraPreview, GetDeviceSize....).

If the app doesn't have permission I ask to give permission, If the permission was not granted the block is not rendered.

To check if the app has permission to use the Camera I'm using that plugin.

https://www.outsystems.com/forge/component-overview/1916/diagnostic-plugin

UserImage.jpg
Diogo Teixeira

Joel Simoes wrote:

Hi Diogo


I also had this problem, what I did was:

Before calling the StartCameraPreview or the GetDeviceSize, I'm checking if the app has permission to use the Camera, if true I show a block where I have all the logic (StartCameraPreview, GetDeviceSize....).

If the app doesn't have permission I ask to give permission, If the permission was not granted the block is not rendered.

To check if the app has permission to use the Camera I'm using that plugin.

https://www.outsystems.com/forge/component-overview/1916/diagnostic-plugin


Thanks, that plugin will help a lot !

2020-03-04 14-50-24
Armando Gomes

Hey Diogo, 

Can you share a sample having that issue? We want to understand if it's a plugin problem or a "system" problem as, for instance, having the camera "locked" in a different application.

Cheers!

UserImage.jpg
Diogo Teixeira

Armando Gomes wrote:

Hey Diogo, 

Can you share a sample having that issue? We want to understand if it's a plugin problem or a "system" problem as, for instance, having the camera "locked" in a different application.

Cheers!


My problem here is, when I give permissions to the camera, the onReady are already disputed and it's there where I use the GetDeviceSize and StartCameraPreview

2019-03-07 09-58-19
Joel Simoes
Solution

Hi Diogo


I also had this problem, what I did was:

Before calling the StartCameraPreview or the GetDeviceSize, I'm checking if the app has permission to use the Camera, if true I show a block where I have all the logic (StartCameraPreview, GetDeviceSize....).

If the app doesn't have permission I ask to give permission, If the permission was not granted the block is not rendered.

To check if the app has permission to use the Camera I'm using that plugin.

https://www.outsystems.com/forge/component-overview/1916/diagnostic-plugin

UserImage.jpg
Diogo Teixeira

Joel Simoes wrote:

Hi Diogo


I also had this problem, what I did was:

Before calling the StartCameraPreview or the GetDeviceSize, I'm checking if the app has permission to use the Camera, if true I show a block where I have all the logic (StartCameraPreview, GetDeviceSize....).

If the app doesn't have permission I ask to give permission, If the permission was not granted the block is not rendered.

To check if the app has permission to use the Camera I'm using that plugin.

https://www.outsystems.com/forge/component-overview/1916/diagnostic-plugin


Thanks, that plugin will help a lot !

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.