I know this is probably something quite simple, but I seem to be struggling with it. I don’t want the app to pickup where it left off. If a phone call comes in, or the user decides to do something else then come back to the app, I want it to start over completely. I am using Composer, have 2 scenes where scene1 goes automatically into another scene. So the user doesn’t have to do anything but start the app and everything loads and goes.
The app updates periodically and I want the scene1 to show each time it opens. So the solution that I thought would work is adding the code below to the “did” phase of the scene template for composer for scene2. I don’t know if I am going about this all wrong, have something wrong with the code snippit itself or if I just have it in the wrong location. Note: I do have the listener in the right there along side the rest of the, just like it is shown below.
local function onSystemEvent( event )
if ( event.type == “applicationSuspend” ) then
composer.removeScene( scene2 )
end
end
Runtime:addEventListener( “system”, onSystemEvent)