Pro camera switch camera rear to front and return

I'm developing a small camera app. I use the Extention Pro camera. It works, but I can't find a way to switch back and forth between the two cameras in the app.

Thank you for your answers, best regards

Maybe try with the help of 2 buttons ..

1 Like

Perfect, it works as it should. I had already tried the same thing with 2 buttons, but without resetting the camera.

Thank you very much

1 Like

You could use a single Button

image

or a Switch

image

1 Like

If I plug an external camera through the OTG input, can I select it? Is there a way to do this in the "pro camera" plugin?

You have already asked this question, and got an answer here:

I couldn't see a blog where we can select values in the procamera plugin.

Just use a number block and test with different numbers as suggested

The rear camera turns on at 0. The front camera is turned on at 1. External camera does not turn on at 2 or 3. It gives an error and closes the application. Any other ideas? Thank you for your answers, dear friends.

how can ı added 3 in github code

You won't have any success doing that. The OTG camera needs to show up in the Android cameras list, where it will automatically be given the "next" number. The setCamera block accepts an integer.

Is there a code block where we can get the list of cameras?

Not in this extension, or in AI2...

It looks like you do not have access to the OTG camera, also not with my camera extension

my camera extension is able to return the number of available cameras... App Inventor Extensions: Camera | Pura Vida Apps

Taifun