I want the app to completely reset when the user receives a call or presses the home button or clicks an ad or anything else, so when they user opens the app again it starts over.
local onSystem = function( event )
if event.type == “applicationStart” then
print(“start”)
elseif event.type == “applicationExit” then
print(“exit”)
elseif event.type == “applicationSuspend” then
print(“suspend”)
elseif event.type == “applicationResume” then
print(“resume”)
end
end
– setup a system event listener
Runtime:addEventListener( “system”, onSystem )
I have found this but I do not know what to put inside of the applicationSuspend block. Thanks!