I’m having some trouble on some android devices and i suspect the iTouch. When my app resumes i need to open the Database.
My resume psudo code looks like:
local function onSystemEvent( event ) .... elseif (event.type == "applicationResume") then native.setActivityIndicator( true ) databaseManager:setupDB() timer.performWithDelay(500, function() logit("Resume Complete"); native.setActivityIndicator( false ) end)
My problem is that user action on the gui can occur prior to the “Resume Complete” message
What i see is that sometimes the user is able to get touch events into the system before the DB is open.
This results in general badness … sure i can sprinkle code throughout to make sure DB is ready but that is nasty event to contemplate … i would have assumed that the resume event occurs before everything and that turning on the activity indicator would preclude user touch events.
Any insights are most welcome