So I’ve just tried the simplest program possible (below) and found that (on 3GS running 4.2) it seems to freeze the phone for a few seconds when the home button is double tapped and the music stops (known issue.) The only time the app is truly suspended is when the home button is double tapped but the app is not switched away from. Tapping the upper part of the screen switches back to it and does seem to generated suspend and resume events. It would be so nice to have the proper suspend resume here.
M
[lua]local dot = display.newCircle( 100,100,100 )
function touch( event )
dot.x, dot.y = event.x, event.y
end
Runtime:addEventListener( “touch”, touch )
function system( event )
print(event.type,dot.x,dot.y)
if (event.type == “applicationStart”) then
dot:setFillColor(0,255,0)
elseif (event.type == “applicationExit”) then
dot:setFillColor(0,0,0)
elseif (event.type == “applicationSuspend”) then
dot:setFillColor(255,0,0)
elseif (event.type == “applicationResume”) then
dot:setFillColor(0,0,255)
end
end
Runtime:addEventListener( “system”, system )[/lua]
[import]uid: 8271 topic_id: 6000 reply_id: 306000[/import]
[import]uid: 13859 topic_id: 6000 reply_id: 20743[/import]