Take photo, save it and change filename

Hmm. Like that?

I am wondering that what you want to display in image component.
You are setting picture to different path and storing value in different tag.
Do you want to show captured image?

No, only save to folder with correct filename.

If so then get value for image tag from TinyDB and use it in GetFileName method of TaifunFile extension.

I have no idea how it should be done. Like that?

Use this as filename:
image

Try like this:

blocks (48)

1 Like

It is not recommended to use Async blocks unless you are dealing with big files or functions who highly affect main thread.

1 Like

Camera images are usually between 2 and 4 mb - big files!

1 Like

Then it's ok :sweat_smile:

1 Like

Works! Can I hide source of the photo and photo? I want only to save them.

1 Like

Yes, you don't need the label or the image component, they are just there for proof that it works! You might want to replace(in the "when TaifunFile1.Moved" event) with a notifier alert: "Image saved" or something similar....

1 Like

Check out this

Example.aia (2.2 KB)

1 Like

This is not working. I can't see saved picture in phone gallery. Do you know something about that?

2 Likes

Android version ?
File paths ?

Show your relevant blocks....

1 Like

this is the from example aia from @Oakchris1955
I tried on android 8, 9, and 10

2 Likes

and what exactly is not working?

Try in companion app and use Do It on your blocks to identify issues.

1 Like

Try this:

Android ≥ 10:

1 Like

On old android works. But in gallery shows only when I restart the phone (turn off and on).
On new android don't work at all..

1 Like

What doesn't work at all? The pic is created and saved in the ASD for Android 10+ devices.
But it seems that pics / images from the ASD are not shown in the Gallery.

On devices with Android < 10 you can try the TaifunTools.GalleryRefresh method.