Hi all,
using the following code from the Corona Reference:
local path = system.pathForFile( “data.txt”, system.DocumentsDirectory )
local file = io.open( path, “r” )
if file then – nil if no file found
local contents = file:read( “*a” )
print( "Contents of " … path … “\n” … contents )
io.close( file )
end
I can load in and display text fine in simulator, but when I build and open the program on my android device nothing happens. In fact when I add an else statement to display some generic text it won’t even display that (so I guess the program is breaking). I’ve checked case sensitivity etc. my text file is really basic, just has the words “Hello android” in it (without the quotation marks) and is located in the root folder where the main.lua file exists. Is there something I’m missing? is this an android limitation?
Marty [import]uid: 7548 topic_id: 1494 reply_id: 301494[/import]
[import]uid: 6678 topic_id: 1494 reply_id: 4189[/import]