Having the user take a photo with the camera

use file component
before call camera take picture delete the file first

IMG_20231115_123356

Did I Do It Right?

This did not work, it still transfers the first picture

Pictures is a directory, but not a filename
use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing and Debugging
Taifun

So how do I delete the file?

Get the path to the file…

Ask yourself: where did you already get it? And how do you have been able to display the file in an image component?

Learn to use Do it

Taifun

A post was split to a new topic: Issue while copying blocks

delete this
image

1 Like

@LIFE_AI it looks like you do not understand what this thread is about

Taifun

1 Like

Hey @Taifun, I tried something like you said, but it still didn’t work on Android 11. Please help me, I’m about to go crazy. It works at first. After the 3rd photo, no matter how many photos I take, I still can’t take the 3rd puts the photo

My blocks

prepare a small test app as small as possible which elicits your issue and add it into this thread, so someone can take a look
Taifun

I will do it as soon as possible

Try this:

I will test it and let you know.

takePicture.aia (32.6 KB)

Hey @bodymindpower It worked, but for example, I take the photo for the 1st time, it doesn’t transfer, but when I take it for the 2nd time, it does.

At first, the addition transferred the photo twice without any problems, but then the problem that I mentioned in the previous message occurred.

Empty the /Pictures folder in the ASD of the Companion app, then start the app (connect to Companion), take 3-4 pictures and then post a screenshot like I did.

I tested it on Android 11 & 13, no problems at all (with Companion).

But I am testing with apk. How do I delete the Pictures file in the apk?

Uninstall & reinstall the app.

I did it and even deleted the data of the application, I still encounter the same problem.