Sometimes the network call takes long enough to where the user might think the app is stuck so I want to add an indicator, telling the user to that processing is indeed in progress.
This is my network call:
function writexml(xmlsend,destip,destport)
client = socket.connect(destip, tonumber(destport))
if client then
client:send(xmlsend .. "\0")
s = client:receive()
client:close()
result = s
else
result = "ERROR: Connection Timed Out"
else
result = "No Connection"
end
return result
end
Have tried native.setActivityIndicator() and also setting an image alpha to 1.0 before the writexml function is called and in the writexml function itself.
It seems no matter what or where I’m trying to turn on some kind of activity indicator the socket gets done before anything displays.
What am I missing where?
I’d be quite happy to simply make an image visible before the socket.connection and turn it off when socket is closed. [import]uid: 6547 topic_id: 23833 reply_id: 323833[/import]

[import]uid: 52491 topic_id: 23833 reply_id: 97642[/import]