hello
i have a problem while suspending or exiting an app.
when i suspend/exit with the home button, i want my app to send a network request to a server to checkout of a game, so i made this code:
[code]local onSystem = function( event )
if event.type == “applicationSuspend” or event.type == “applicationExit” then
if _G.actualSeat then
networkrequests.onExit()
end
–timer.performWithDelay(1,function() end)
os.exit()
end
end
Runtime:addEventListener( “system”, onSystem )[/code]
but sometimes it runs when i click on home button, other times it runs when i resume the application, what can i do, any workaround? i really need to checkout when suspend/exit.
using build 878 with ipad3
thks,
Edou Suilen [import]uid: 92107 topic_id: 30052 reply_id: 330052[/import]