Having the user take a photo with the camera


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

Hey Taifun, now that I think about it, I already want access to all media when the screen is activated. It also asks for camera access when I press the button. Then the problem is caused by something else.

Hey, I found it. First of all, I select a picture for Picture 2 from the gallery, then I adjust the first picture I took with the camera, it adjusts, there is no problem, But instead of the other photos I took, he puts the first photo

Great
However I did not understand your explanations

Taifun

Sorry, I’m using translation so you might not understand.First of all, I have a picture component named picture2. I show the picture taken or selected by the user to the user from there. If picture2 is empty, when I take a picture, it does not transfer the picture there first I have to select a picture and then take a picture and it transfers the first picture I took, no problem, but when I take another picture it does not transfer that one, it transfers the first picture I took instead. I hope you understand

What about providing a screenshot of your relevant blocks?
Taifun

1 Like

Oh we couldn’t get along :grin:


IMG_20231114_015838

Why are you still using the AfterPicture event?
One of issue in Kodular is, that this event does not fire anymore…
Remember, therefore we are using the workaround

Taifun