Reading file from asset folder sometimes returns "File not found"

Reading file from asset folder sometimes returns "File not found"
0

#1

On the game, some Android devices cannot read the sound files in the asset folder. If it does happen, it cannot read any of them, but other resource files seem fine. I would say less than 1% of the users experience this but I am yet to find the root cause of it. I am using fmod but this does not seem to be fmod related as it just returns “file not found” as an error.

To access the file, I use:
file:///android_asset/XXX
Since the fullpathforfilename() function does not work on Android for unknown reason

I am wondering if this is something time-related (ie, on slow device asset are not available at the time I try to read them or something like that). Anyone experienced the same thing before?

Thanks


#2

are you using getWritableDirectory()?


#3

No. I am not trying to write, but to read files from the apk package. Does it change anything?