Hi,
We have faced the problem that the first attempt of HTTP POST with network.request on Android 4 or later fails not every time but frequently especially when the app has got active from background or waking up from sleep. The fail means timeout error returned in very late. The same code runs very fine on both iOS and Android 2 series.
We are using Corona SDK 2013.1137 (2013.6.7) with the following simple HTTP POST code,
local function setSchedule(spaceID, type, action)
local function listener(event)
if event.isError then
print(“cant’t”… type …" EventSchedule!!")
else
print(event.response)
print(type…" EventSchedule!!")
if action then
action()
end
end
end
local headers = {}
headers[“User-Agent”] = userAgent
local params = {}
params.headers = headers
network.request(urlBase…"/postschedule.php?spaceID="…spaceID…"&userID="…userId…"&type="…type, “GET”, listener,params)
end
Thanks in advance!!
odaken