Android Question To save the photo in the specified folder

Itila Tumer

Active Member
Licensed User
Hello.
I am taking a picture. How do I save the contents of the folder I specified?
For example, I want to save my photo in the xxxx folder.
If the xxxx folder does not exist, I want to create a folder named xxxx and register it in it.
I couldn't catch a hint about the subject.I'm waiting for your help.

The project is available in the link because the file size is large.

https://yadi.sk/d/TfLXZfjyBOUDcA
 

mangojack

Well-Known Member
Licensed User
Just test If the folder already exists ... if not then create it. See File Methods ...

B4X:
If Not(File.Exists(File.DirInternal,"my_new_folder")) Then
    File.MakeDir(File.DirInternal,"my_new_folder")
End If
In your testCamera app uploaded recently , you are already saving the image to File.
Just save directly to your new folder OR copy it to this folder later from your saved temp File.

'if you want to save to another locations .. ie. File.DirDefaultExternal or File.DirRootExternal , you might want to read up on Runtime permissions.

'https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/
 
Last edited:

Itila Tumer

Active Member
Licensed User
Just test If the folder already exists ... if not then create it. See url=https://www.b4x.com/android/help/files.html#file] File Methods ... [/url]

B4X:
 If Not(File.Exists(File.DirInternal,"my_new_folder")) Then File.MakeDir(File.DirInternal,"my_new_folder") End If
In your testCamera app uploaded recently , you are already saving the image to File. Just save directly to your new folder or copy it to this folder later from your saved temp File. 'if you want to save to another locations .. ie. File.DirDefaultExternal or File.DirRootExternal , you might want to read up on Runtime permissions. 'https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/
Thank you. I'm testing.
 
Top