RJM
unread,Feb 26, 2011, 12:33:18 PM2/26/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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!