Adobe Air for Andoid App - Trouble Bringing App to Foreground (Actionscript 3)

97 views
Skip to first unread message

RJM

unread,
Feb 26, 2011, 12:33:18 PM2/26/11
to Adobe AIR for Devices
Hi All,

I'm in the process of creating an Adobe Air for Android app and am
having trouble bringing the app to the foreground in the Android
system.


Part of the functionality of the app is to set alarms, when an alarm
sounds I want to wake the phone and bring the app to the foreground.


I have tried this:


public function onAlarm(event:TimerEvent):void
{
NativeApplication.nativeApplication.systemIdleMode =
SystemIdleMode.KEEP_AWAKE;
NativeApplication.nativeApplication.activate();
alarm.stop();
popup.addEventListener(MouseEvent.CLICK,onPopUpClick);
this.parent.setChildIndex(this,this.parent.numChildren-1);
this.addChild(popup);
alarm_tone_channel = alarm_tone.play(0,20);



}


When the alarm goes off I can hear the alarm tone and the phone is
woken from sleep but the app will not be in the foreground.

On the PC i can use: this.stage.nativeWindow.activate();

to bring the app to the foreground but nativeWindow is not supported
on mobile devices.


Hope you can help!



Reply all
Reply to author
Forward
0 new messages