Android Question File access

kepler

Active Member
Licensed User
Longtime User
Hi,

I know of an astronomy android app that can access some bin files in DirAssets (I supose it's in this place; maybe it's in DirInternal instead...all that I've tryed don't work).

I made a small java library, where B4A gives it the path to the files. But I get - all ways - a not found message. Still, in B4A, the files are there - I've checked with File.Exists.

Does anyone has some experence in this field? Which string must I feed? And, I thought that we could not read bin files... I'm a little bit puzzled here... :/

Kind regards,

Kepler
 

kepler

Active Member
Licensed User
Longtime User
Good morning Erel,

In fact, the binary file is rather big and needs specific access for computations. Not likely for being handled by B4A I'm afraid...

So I'm reading it from Java. The only problem I have is to have a valid path to provide the java library (I feed it as a string). All the paths I give can't seem to find the file.

Kind regards,

Kepler
 
Upvote 0

kepler

Active Member
Licensed User
Longtime User
Hi Erel,

I finally found what the problem is: my routines have to read files in random access - which isn't allowed from Assets. So the only solution I've come up with, is to copy the files I want to the DirExternal folder (only once of course). From there, I just feed this path to the java library and I'm good :)

Kind regards,

Kepler
 
Upvote 0
Top