Pro camera: The pro custom camera

If I use the PermissionGranted event to initialize the camera, the camera will be initialized only once. From the next time the event won't be triggered. So I used a clock which gives 5 seconds to the user to give the permission.

That would require extra off-topic work. The person was after saving and viewing the image, not after the permissions.

No, you just have to use the right blocks.

Storage permissions are not required on Android 11+ for one of the Shared folders (like /Pictures).

I know that you mean saving permission data in TinyDB, right ?

But that shouldn't matter, I was just after solving the image saving problem.

Would the app crash if I request the permission ? (I don't actually know.)

Why should it? But it's just unnecessary. You should always request as few permissions as possible! I've pointed this out often enough.

2 Likes

Is it possible to save the output as png and not jpg?

The Procam extension saves to jpg by default. You can convert it using this extension:

How I have to put image or image sprite on camera view?

Use the AddComponent block to place an arrangement on the camera view, then you can put whatever you want inside the arrangement, and it will display in the camera view.

1 Like

Compliments to a very powerful extention!
Is any possibility to take the coordinates of the smartphone screen pixel where the user touched the screen (when the .Touched event was fired or by any other workaround)?

Use your location sensor to return coordinates

I adjusted my question - i was speking about screen coordinates in pixel

If you place a canvas in your arrangement (to fill it) and set background to none, you can get the x,y coordinates from a touch event. You would then need to "translate" these x,y coordinates to match the actual pixel positions in the camera view (if these are different)

Thank you. I placed canvas in arrangement CameraLayout (both with Background to none) and initialized ProCamBase641 passing to it CameraLayout arrangement. But when i click on previewed image only ProCamBase641.Touched event was trigged but Canvas.TouchDown event was NOT (and i can't take coordinates of my click).
I tried also to add component Canvas2 to ProCamBase641 after its initizialization but TouchDown event continua not firing. Where is my error? Thank you very much

Try removing the ProCamBase641.Touched event.

Use a button somewhere else on the main screen to capture the image.

Or perhaps try the canvas touch up event instead....

Having tested, this seems the best solution ?

image

2 Likes

Thank you very much! It works!

I'm trying to switch on/off flash during Image acquisition. Image acquisition is working and the ProcamBase641.Flash is changing from TRUE to FALSE and vice versa (clicking the FlashBtn) but the flash is always OFF. I'll be very thankful for any recomendation. Where is my error?
Thanks

Turn the flash on before you Initialize the camera

Thank you very much. Now it Works!

1 Like

where is the extension base641? i cant find in the procam extension.

[extension removed by mod. direct link not allowed unless you are the author. ]