AbsolutePath
Converts content URIs provided by a File Picker (AI2 Component) into absolute paths.
I made this function for another function I made that needed absolute paths.
GetAbsolutePathFromUri
Update v1.0.1 Mar 01, 2025.
You can now get the path from the SD card.
You can't get the paths from other locations, only from these two locations at the moment.
Update v1.0.1 Mar 01, 2025.
aiaProject:
PathFromUri.aia (9.9 KB)
Extension:
joejsanz.joedevabsolutepath.aix (7.8 KB)
minSdk: 21
maxSdk: 34
JDK: 11
Created with Fast. v2.4.2
fast-cli
Thanks.
5 Likes
TIMAI2
January 25, 2025, 1:17pm
2
Much needed standalone function. Should be in AI2 by default.
3 Likes
Thanks a lot Tim
I think the same.
2 Likes
This works well if you select a file from emulated/0 but it doesn't works if you select a file from sd card...
Yes, I have fixed that in the new version but I haven't published it yet because I found other bugs.
When creating the APK it doesn't get the path to some documents.
Anke:
I think I made a mistake when putting the minSdk: 26. I copied it from other documentation I made so as not to write so much and I didn't notice that, I'm going to review the code because I think it is minSdk: 21.
Update v1.0.1 Mar 01, 2025.
Joejsanz:
You can now get the path from the SD card.
You can't get the paths from other locations, only from these two locations at the moment.
Update v1.0.1 Mar 01, 2025.
aiaProject:
PathFromUri.aia (9.9 KB)
Extension:
joejsanz.joedevabsolutepath.aix (7.8 KB)
I'll take a look at it tonight, why doesn't my device get any error when I try all the files I have?
I didn't try it in Companion.
Or maybe your file is different from the ones I have?
Anke
March 1, 2025, 4:46pm
13
APK works fine. The issue is only with Companion.
1 Like
Thanks Anke, I'll check it out on companion.
Anke
March 5, 2025, 12:01pm
17
No , SAFLight
doesn't work when picking a file from a removable SDcard, neither with Companion nor with the APK.
1 Like