Hi, I'm facing a problem with reading a file. I've read all documentation and forums posts I've found, but none of them actually helps, and I think it's something very simple.
I've placed a file "en_US.json" in a Corona project folder (same as "main.lua"). Then I want to read this file in a runtime:
It works correctly in Corona Simulator, but it is not working on Android phone. I understand that system.ResourceDirectory should be equivalent of application .zip file, and some files can be read from there only by specific APIs. But .json file should be possible to read (I'm not trying to write anything into that file).
These lines are for Corona Simulator, without that it's also not working on Simulator:
but on Android I have an error in io.open() (passing a nil value).
Eventually I'd like to create a subdirectory for language files in system.ResourceDirectory, but I don't know how to read those files on Android.