Having the user take a photo with the camera

Hello, I need to have the user take a photo with the camera and save the picture. I was able to open the camera this way, but how can I turn off the camera after taking the photo and transfer the photo to picture2?

I did something like this


but it still have the problem of kodular cant parse the bitmap it returned so better use the internal camera component or use extension

I can’t use the camera component, the user has to take the photo, not me.

camera component launch external camera

Can you show me an example how to start it?
Among the components, there is no option such as launch the camera, there is only take a photo.

just try it in companion ull know

I will try and write, thank you


I’m getting an error like this

my blocks

You can find a workaround for the camera 201 bug here

Taifun

Didn’t work

I don’t have the blocks in the picture

What happens if you try the apk provided there?

After the SDK33 release you most probably additionally need READ_MEDIA_IMAGES permission

Taifun

When it says it’s not working, it turns on the camera and takes the picture, but it doesn’t transfer the picture.

I asked for the permission you mentioned when pressing the button, but it still didn’t work in Companion (I can’t compile the apk, it gives an error)

It looks like the companion still does not have the new permissions… Kodular's position in not meeting the demands - #51 by Taifun

You will have to build the app to test therefore

Btw. What about providing an updated screenshot of your relevant blocks?

Taifun

I removed the apk and it still doesn’t work. This time it doesn’t turn on the camera either. Even if there was no camera permission beforehand, it asked for permission when I pressed the button. It doesn’t want that anymore either, after doing what you said.

???

You did not follow the mentioned workaround

Also you ask for permissions and then try to take a picture immediately without having received the permission

Use the TakePicture method somewhere else, for example in a button click event

Taifun

Sorry, translation error, it translated as I removed the apk, I meant I tested it with the apk.

I’m testing it right now