Create a folder in assets

I need to create a folder in a folder in assets folder of application, kindly guide me :slight_smile:

lets take an example like assets/test/myasset.etc

Why do you need that to be in the assets folder? Why not in the ASD?

Actually i am using a libary that needs an asset file to be in a subfolder of assets dir

What library is that?

Can you not point to a different folder?

Assets files are only readable in runtime and not writable.

4 Likes

Solved, i create a blank extension with the folder name as package and putted assets in it and it worked like charm

:smiley:

4 Likes

Can you please explain that in more detail.
And post a test aia (or APK).

What :question:

What is this about?

As I said:

1 Like

He wants to create sub directory in the assets folder.

Maybe he could just add a new folder to the assets directory in the extension after being compiled (rush). Else create blank extension.

1 Like

Yeah, I got that. But what is (the name of) this subfolder and how is it accessible at runtime?

/data/data/<packageName>/...

And what exactly is the purpose of this (if it is even possible)?

Some libraries use those subfolders to store different things like (images, natives libs) and others. If you use Android Studio, there is an option for that. It’s just to separate things.


Just calling assetManager.open("/subfolder/something.abd") should make that work.

Okay thanks, which libraries (for example)?

In my case Google’s Ml Kit

1 Like

open your aia file using 7zip, go to the assets directory, create your subdirectory and add your assets, then upload the aia file to Kodular

Taifun

3 Likes

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