It's possible to quit an application completely in AIR for Android as well, using:
NativeApplication.nativeApplication.exit(); On Sat, Sep 4, 2010 at 12:45 PM, Raju Bitter <[email protected]> wrote: > With mobile Flash and AIR applications, Adobe tried to optimize > application behavior when an application looses the focus (when you > hit the home button on an Android device, closing the app window). The > app continues to run in the background, but the framerate will be > reduced to 4fps, unless the application does audio or video playback. > This is the example code for catching those events in OpenLaszlo: > > > <?xml version="1.0" encoding="UTF-8"?> > <canvas bgcolor="#ffffff" debug="false" height="100%" title="Mobile > OpenLaszlo AIR app" width="100%"> > > <passthrough> > import flash.events.Event; > import flash.desktop.NativeApplication; > </passthrough> > > <handler name="oninit"> > NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, > __onDeactivate); > NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, > __onActivate); > </handler> > > <method name="__onActivate" args="ev"> > Debug.info("onActivate"); > </method> > > <method name="__onDeactivate" args="ev"> > Debug.info("onDeactivate"); > </method> > > </canvas> > > Is there code inside the LFC which will run into problems with such a > low framerate? Could objects be destroyed in such a case? How would > you handle such a situation within an OL app? >
