11-24-2011 01:22 AM
What are the minimal actions which an app must take in order to be allowed to stay running?
As a learning exercise and to assist with testing something, I've tried writing a nearly function-less app (as in, performs no function... not "doesn't call any functions").
It launches with a nice white screen (provided by the OS, I suppose, since I don't render anything) and sits there for 30s, blocking on a low-level event of some kind (not even the BPS event stuff... just raw posix).
After 30s, the OS kills the process.
Any idea why? What does an app have to do to be allowed to live for longer? Calling bps_initialize() is not sufficient... tried that.
Does it have to create a screen context? Request any type of events and start receiving them with a get_event() call? Or something else?
(I vaguely recall Elena making a comment about AIR apps needing to do something within some timeout or they'd be killed, but I don't recall what it was and can't find the thread.)
Solved! Go to Solution.
11-24-2011 09:25 AM
All applications (AIR, Native, whatever) must create and present a window within 30 seconds. Otherwise, the system assumes the app has failed to start correctly and will kill it.
The basic assumption is that apps exist to present some interactive behaviour to users. :-)
11-24-2011 10:12 AM
11-24-2011 10:56 AM
11-24-2011 11:05 AM
Technically it is not minimal because it also uses navigator connection, but if you don't connect to navigator you won't recive life-cycle events which is less than ideal