I have this simple line of code that works perfectly on the simulator but gets a nil
on a actual android device:
local path = system.pathForFile( nil, system.ResourceDirectory)
print('path', path)
path = path .. "/assets/audios"
on the android device I get Runtime Error .......attempt to concatenate local 'path' (a nil value)
I read the the android docs and it says you don't need permission to read the internal storage.
What's causing this error? How to solve it?
Do I need to add any special permissions to use pathForFile
in android?