Not able to set picture of image component to an image on user's device using the path

I am making a gallery app.I am able to retrieve the list of images on the user's device,however when I take that path to "set picture",no image is visible.How to solve this problem?
Here are the blocks.To test I copied a path from the list and called the "set picture" method.

Hello,

can you show your relevant blocks? are you using an ImagePicker?

Looks like an issue with File Scope.
Set it to Legacy from Project Properties.

Ok will try,Thanks

No I am not using the image picker.I used the taifun file extension to load image list then put the name of the image in the "set picture".

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


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

Ok will attach the images soon

Updated the post.

I tried this.It is not working.

  1. Put the .FileListAsync block in the PermissionGranted event.

  2. Where does the file


    come from?

  3. Which Android version are you testing on? READ_MEDIA_IMAGES is only relevant on Andfroid 13+. On all other Android versions you must request READ_EXTERNAL_STORAGE.

2.The file appeared in the list view i copied down the path and used it.It is in the internal storage.
3.I am testing on android 14.

Putting the .FileListAsync block in the PermissionGranted event also did not work.

Then follow step 1 and set the path this way correctly: file:///storage/...
(with 3 slashes) and uninstall the previous app first.

Thanks everyone!
It worked.I just used the join bock instead of manually entering "file://" and it seems to work.Maybe I typed the path wrong.

Yes, as I already told you in post #13. To use a join block doesn't change anything. “file:” must be followed by 3 slashes. So file:///...

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