Deactivate event not firing? - AIR + Flash + Android
Hi,
When I play a flash game in Android (using AIR apk compilation), and then press the device's "HOME", the game keeps running, and I even hear the gameplay sounds!
Then I tried to do this:
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, handleDeactivate, false, 0, true);
private function quitGamesButtonClicked(mouseEvent:MouseEvent):void {
Object(parent).gotoTitlePage();
}
But it does not seem to work. That is the code that should prevent the mentioned issue? Should I put that code in some specific place?
Thanks!
-- PS: I get an error when runing the ADT command,: error 307 descriptor must be at least namespace 3.0, but then I change the xml files to 3.0, to be able to generate the apk, maybe this has something to do with it?