Hi. The following code seems to work on the simulator but not on my phone.
1 2 3 4 5 6 7 8 | local path = system.pathForFile( "something.shtml", system.DocumentsDirectory ) local htmlFile = io.open( path, "w+b" ) -- Request remote file and save data to local file http.request{ url = "http://www.some.url.au/some/file.shtml", sink = ltn12.sink.file(htmlFile), } |
In build.settings file ::: do you have the following?
settings =
{
android =
{
versionCode = "1"
},
androidPermissions =
{
"android.permission.INTERNET",
"android.permission.ACCESS_FINE_LOCATION",
"android.permission.SET_ORIENTATION"
},
Thank you.. will try it tonight.
Worked fine.