PathFromUri function works on AI Companion, But not when building .apk

Sorry, I thought of something else.

In that case, the problem can be because of READ_EXTERNAL_STORAGE permission.

I downloaded APK editor studio in order to view and edit the manifest, the READ_EXTERNAL_STORAGE permission and the MANAGE_EXTERNAL_FILES are both in there.
What do I have to do in order to fix my problem?

Thank you.

You also need to ask them using Screen1.AskPermission block.

Something like this?

Yes, that's right.

Alright, will try it out and then let you know.
Thank you so much for your help!

Unfortunately, it didn't change anything on my Android 11. I still get this same error:

Which is caused I believed by this block:


Still the PathFromUri function is returning nothing.

I have to wait to test this on my Android 9 since I don't have the phone right now :(..

EDIT: My apologies, it does make a change. Now the PathFromUri function kinda works. it does return a valid path for files like jpg, jpeg, mp4, apk.. but when trying to select a CSV or txt file, which are the file types that I'm interested in, it still returns that error I posted..

To access non-media files in the external storage (outside of the ASD) we have to wait until AI2 has implemented a way to open those files using the Storage Access Framework (SAF), especially on Android 10+ devices.

grafik

1 Like

Hello
Is there some thing news about this subject ?

My guess is, you asking for news concerning this

Try the SAF extension

Taifun

1 Like