http.request question

Hi. The following code seems to work on the simulator but not on my phone.

[lua] 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),
}[/lua]

On the simulator I get the file, whereas on my phone I get a zero-length file. My phone does have a data connection. Any ideas? Targetting 2.2 and running 2.2. Thanks! [import]uid: 23949 topic_id: 6162 reply_id: 306162[/import]

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”
},

[import]uid: 10965 topic_id: 6162 reply_id: 21197[/import]

Thank you… will try it tonight. [import]uid: 23949 topic_id: 6162 reply_id: 21229[/import]

Worked fine. [import]uid: 23949 topic_id: 6162 reply_id: 21358[/import]