Picking an image and copying it to ASD

Thank you for your attention.

I've build 2 tests.

Test 1:

Try_ImgPick.aia (36.0 KB)

Result (Screen shot):

Test2:
Try2_ImgPick.aia (36.0 KB)

Result:

I appreciate your help,
Eran.

for the first solution I would try to start the relative path with a slash...
/DCIM/Camera/...

for the second solution I would try to first ask for READ_EXTERNAL_STORAGE permission in Screen.Initialize using the AskForPermission method...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1st: Added a slash, still fails

2nd: Added the READ_EXTERNAL_STORAGE request -> Success!
Thanks!

I still would like to understand how the ImagePicker does this without permission?
And how commercial apps creates and uses a dedicated directory?

Hello, i am new here.

Help me!

After taking a photo, resizing it, I copy it to the Download/Photos/imagename.jpg folder

Now I want to set image1 to receive the copied photo, how do I do that?

Another question, how do I rotate the photos obtained through the activity starter, since it comes from a resultURI?

Android 13

Try the absolute file name, which is
file:///storage/emulated/0/Download/Fotos/...

Show us a Do it result

Use the companion app and 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 Tools

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

When I try to rotate an image from activy starter the result is eacces permission denied!


It worked, but when I rotate the image that came from the camera, after it was copied, it disappears.

However, in the Fotos folder, the image rotates, but does not show in Image1.

Try a full path: file:///storage/emulated/0/...

grafik

Some devices (Android versions) require a full path. For others, the absolute path is sufficient, but the full path should always work.

Thanks, it worked!.

Just one more question!
When I try to rotate an image from activy starter the result is "open failed: eacces permission denied!" and, it doesn't resize either.

Picking an image and copying it to ASD

Why not just use the SAF extension, pick the file, save it out to the ASD, then fiddle about with that file?

I'm sorry, but I'm a beginner and I don't know how to use this SAF extension. I need to select image, copy it to a folder and if necessary, adjust, resize and rotate, and show it in Image1.

for example:

Why don't you just use the image picker component? As you copy the image to ASD, its limitation is not relevant for you

Taifun

Yes

Yes, but with the imagepicker the images are being overwritten, I've tried several times. How can I prevent them from being overwritten?

Pick an image and copy it to ASD, you may rename it as you like, then pick the next image

Taifun

I will try, thanks for your attention.

Thank you all for your help, everything worked out!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.