Android Question Inline java get asset folder path?

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Hi, what is the code of Inline java get asset folder path?
Also what is about internal directory path?

file1.csv found in asset folder.

I got this error:
Caused by: java.io.FileNotFoundException: AssetsDir/file1.csv (No such file or directory)
 
Last edited:

agraham

Expert
Licensed User
Longtime User
The asset folder is a virtual folder so you need to use the B4A File.DirAssets and specify it in conjunction with the B4A File object to access asset files. It would be mesyy to to do this in inline Java.

For internal file paths use File.DirInternal etc. as strings and pass it to your Java code - though I don't see why you would need to do file operations in inline Java code.
 
Upvote 0

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
I have inline java code that require passing file as parameter.
If i passing File.DirAssets & file name it throw above error!
 
Upvote 0
Top