Android assets sub folder


Todd Baremore
 

XPA 4.8.1
Android 13

I added subfolder "sets" to the assets folder in RIAModules.  The subfolder has a number of files in it.
RIAModules\Android\Source\app\src\main\assets\sets

I'm able to create an APK without errors.

In the Android app I'm unable to access files in the "sets" subfolder.

ClientFielExist('/sets/data1.set') returns False
ClientFileExists(ClientGetAppInfo('cacheFolder') &'/sets/data1.set') also returns False

If I place data1.set in the assets folder
ClientFielExist('data1.set') returns True
ClientFileExists(ClientGetAppInfo('cacheFolder') &'/data1.set') also returns True


Is there something special about accessing subfolders in the assets folder?
Any idea what I'm missing?

Todd


Marc Gauthier
 

Hi Todd,

Make no sense... but we never know... did you gave the Permissions for Files to your applications (App Info) ?

HTH

Marc


Todd Baremore
 

Marc,

I gave the app all permissions.  From what I have read there is a bit of juggling involved in order to access sub folders, most of which I did not follow or did not know how to implement via XPA. To get around the sub folder limitation I ended up renaming the files to include the folder name as a prefix.  "/assets/set1/data1.set" is now "/assets/set1_data1.set"   Was able to use FileListGet and FileCopy  to copy and rename all 4,000 files to the assets folder.   What I needed to accomplish is working and it works offline!

Android assets sub folders would be a good topic for Brown Bag 2023.   Anyone interested?
Todd
On 9/19/2022 2:28 PM, Marc Gauthier wrote:

Hi Todd,

Make no sense... but we never know... did you gave the Permissions for Files to your applications (App Info) ?

HTH

Marc