Image File storage path Reading file problem

Hi All,

I have difficulty in reading image file from Samsung device A02s into image component. Actually I have one sound file and another is image file (.JPG). in a folder named “FFB”. I have read successfully mp3 file from the same folder but when I tried to load image file named “Image.JPG” from this folder. Image component is unable to show it.

I have used this path to access mp3 file and jpg files:

file:///storage/emulated/0/FFB/Audio.mp3 (Successfully read and played using player component)

file:///storage/emulated/0/FFB/Image.JPG (Unsuccessful to read in Samsung and other devices, I have success in Google Pixel 2 XL phone.)

Please help me using correct method of reading image file using path.

did you solve the problem? . …
I also have a problem regarding the image file path, which version of android are you using?

Android 10 on Galaxy A02s and Android 11 on Google Pixel 2 XL. This is a very serious problem. I don’t know that in the same folder mp3 file is accessible but image file is not.

1 Like

Does using a Canvas component help showing the desired picture? :face_with_raised_eyebrow:

GREAT FRIEND, I’m also new to programming, but let’s not give up, I’m creating some code to understand the asd paths including for android 11 version, I’m seeing several with the same problem but we’ll manage.

where is that folder coming from?
are you aware of Googles new file access restrictions starting from SDK30, which will be in Kodular available soon? see also

let me suggest you to store the sound and image in the assets and read them from there

Taifun

2 Likes

Folder FFB is generated by saving the image using Camera.After Picture event which is successful. Write image is successful. This image is changed overwritten by the user and is not an asset that can’t be changed or overwrite. Reading an Audio mp3 file from this same folder is successful.

1 Like

then you should store the image in the ASD or shared storage like /Pictures rather than an arbitrary directory…

Taifun

1 Like

@Asif_Hussain Use this extension and check what’s the correct file path maybe this can help you

1 Like

Attached is the project aia file if anyone can help it resolve.
Feedback_Form.aia (612.3 KB)
It works in my Google Pixel 2 XL but not in Samsung phones.

Link of Google spreadsheet.Feedback - Google Sheets

I hope someone will test it on a Samsung device and would resolve the issue. Thanks.

But this will not work on devices with Android 11+. So you should move it to the ASD or a shared folder (like /Download or /Documents or /Pictures, …).

See also here.

1 Like

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