Take photo, save it and change filename

Hi!
I want to integrate photos in my app. I need:

  1. Click a button to take photo and save it to the phone
  2. It should automatically change filename of the photo from one of textbox in app

It would be great if I could change photo's folder.

How can I do that?

https://puravidaapps.com/camera.php - is there alternative?

Hi @wojti99 Welcome
You can easily do that with any one of the file extensions.
https://puravidaapps.com/file.php

Extension: Taifun File
will help you do all of that

1 Like

Okay, but how do that?
I don't know filename which is creating by App Inventor.

First you need to add camera module?

These blocks save photos to the phone. Is it the correct way?
blocks

AfterPicture event returns file's content uri (if I am not wrong) which you can convert to path and use it.

Still don't know how to do that.
Procedure is:

  1. Take photo, save as random Appinventor_...
  2. Using File extension change name from Appinventor_... to my own
    Right?
1 Like

Yes, 100% correct.

Okay. These blocks are correct? Where I can find content URI?

The value you are storing in TinyDB for image tag.

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