Page 2 of 2
Re: Problem with external file location on Android
Posted: Thu May 22, 2025 9:08 am
by Ats
Yep, it's only "
/assets/" in preview mode

Re: Problem with external file location on Android
Posted: Thu May 22, 2025 10:18 am
by Kjell
Hi Ats,
Ats wrote: ↑Thu May 22, 2025 9:08 amYep, it's only "
/assets/" in preview mode

Well .. that depends on what the desired behavior should be. In DOS & Windows a leading "directory seperator character" means that the path is "relative from the root of the current drive".
https://learn.microsoft.com/en-us/dotne ... -dos-paths
But obviously once you unify the behavior across various platforms, it's going to deviate from platform standards somewhere sooner or later
K
Re: Problem with external file location on Android
Posted: Thu May 22, 2025 12:30 pm
by VilleK
What if we just changed the test for "/assets/" to "assets/" in ZPlatform_Android.inc. I have a feeling that would solve most issues.
Re: Problem with external file location on Android
Posted: Thu May 22, 2025 1:03 pm
by Ats
Yeah, that's the simplest solution

I'll adapt the androidManifest afterwards.
Re: Problem with external file location on Android
Posted: Fri May 23, 2025 2:36 pm
by Ats
I've made the changes to ZPlatform_Android.inc and all the ZGE.java files.
The file loading from `assets/` is now working on all platforms and preview mode.
I've seen those lines in the Docs\ExportAndroid.md :
169 3. Enable "Settings / Security / Unknown sources" on the Android device.
...
179
180 * `/assets/` for asset files, or
181: * `/sdcard/` for file on SD card.
The `/assets/` path should be reflected here. But I didn't try `/sdcard/` yet.