over past months have been developing versatile real-time game engine, , have learned lot, still feel naive when comes application life cycle. specifically, trying implement activity can shuffled in background user, resumed. my current architecture such: have xml menu launcher activity can create real-time game activity using intent. relevant data in game activity referenced through static data structures , variables. game activity creates worker threads in onsurfacecreate() callback of surfaceview object. when user presses button, activity destroyed, , sent xml menu in launcher activity. fine, now. when user presses home button, activity sent background. ok, great. problems arise when user tries find way in game activity once has been sent background. when user touches launcher icon, game destroyed , menu re-launched. also, when user resumes game through task manager, onsurfacecreate() callback fires , worker threads started, game frozen. so, have 2 questions. first, how res...
Comments
Post a Comment