Bringing AIR app to front

Hi,
I'm looking for a solution to bring my "Flex coded" AIR app
automatically to front when a certain event occurs.
In my case this is a LocalConnection event that I'm listening
to. I read through the LiveDocs
and came to the NativeApplication class an its "activate()"
method but I don't know how to
glue things together that it works as expected...
Hope someone can help!
Thanks,
Michl

Hi!
I did the same thing with localconnection. I have an
'activate' method which I invoke through the localconnection. My
class constructor get the NativeApplication object and stores it in
nativeApp. In the 'activate' method, I just do
nativeApp.activate ;
This seems to work. An issue that you may run into is that
there may not be an active window. I have code for minimize,
restore, maximize, etc. Here is a snippet to get the active window.
var nw:NativeWindow;
try
nativeApp.activate();
nw = nativeApp.activeWindow;
if ( nw == null ) {
if ( nativeApp.openedWindows.length > 0 ) {
nw = nativeApp.openedWindows[0] ;
nativeApp.activate( nw );
Complete the snippet with your 'else' and 'catch' logic. This
seems to work fine for me.

Similar Messages

  • How can I bring other application to front, or put AIR app behind another application?

    The simple case is that I'm launching a browser URL. However,
    I'm finding that the browser does not come to the front, it's
    opened behind the AIR application. What I really want is to bring
    the browser to the front. What might work is to send the AIR
    application to the back. Can either be done?

    "there is no way to send your AIR app go to the back of the
    desktop display stack"
    Okay, I found NativeWindow.orderToBack(), and it seems to
    send the window to the back of the entire desktop display stack...
    seems to be what I want. Am I missing something?
    I intentionally leave the window in fullscreen mode, which
    means when the user exits the browser/app that is now over top of
    it, they are back to their presentation in fullscreen mode. Now if
    only AIR could open those .pps files directly without the browser,
    and it would be perfect.

  • Bring app to front... without activate?

    is there a way to make a current running app the front app without using activate... or to tell activate to NOT open the app if its not open... or... well
    heres my problem...
    I'll have a few apps on my machine of different versions while testing stuff. messing with Wine apps and X11 and stuff, a lot of times things get thrown to the back, so i want to give a simple command to OSX that can bring it to the front as the active app.
    using...
    osascript -e "tell application \"AppName\" to activate"
    usually makes it come up front... but the problem is occasionally if I have a different app on the computer that has the same name and preferences file, that it instead opens that app up and tries to run it, throwing the app i wanted in the background...
    so basically I want a way to activate an app as the main app simply, but to find the current running app, not try to open any other apps that aren't open...
    using osascript I didn't want to make it super complicated checking whats running and names and all kinds of logic just to decide what to activate. I'm thinking there has to be a simpler way to do this, with Applescript or some other way....
    any help is appreciated

    the problem is timing... and I don't want to use any type of delay/sleep commands, I want it to go as soon as it can... going for speed.
    The problem is... my app has to run multiple other apps and many processes. What I have to do is have an app launch in the background (an X11 build actually, not default X11.app), and then do some other things... then the final results are all running in the X11 app, so I need to bring it back to the front most application. The problem is, the place my script gets to, to wait for the X11 app, the X11 app is not always finished loading completely. If i tell it to activate to bring it back up front, and its fully done loading, then it works fine. Times when its not fully done loading (usually just a second or less away), OSX goes and finds another app with the same name and ID and launches it instead.... sometimes...
    This will lead to rare and annoying bugs with my app... though most of the time it would work fine. On older, slower machines it messes up most of the time.
    I have started using tell application id "$APPIDNUMBER"
    I tried this in the bash script
    /usr/bin/osascript <<END
    repeat
    if application id "$IDNAME" is running
    tell application id "$IDNAME" to activate
    exit repeat
    end if
    end repeat
    END
    so it basically set in a loop until that program was running. The bash script its running out of works fine on 10.5 and 10.6 doing that as far as I could tell, but only when running it directly, which doesn't happen, when it was opened from another process, it gets stuck in the loop forever, no matter what the id does.... it also didn't work at all on 10.4, it apparently doesn't understand "is running"
    so trying to find a way to do this only when the app is actually running, to tell it to activate... without using arbitrary wait states... cuz that leads to problems, especially for portability and longevity....

  • XCode 5.1 updated and now I can't debug AIR apps on iOS Simulator anymore

    Today XCode updated itself to version 5.1, with new iOS 7.1 platform support. It updated itself without asking permission, and now I can't run my AIR apps on the iOS simulator anymore. All my apps fail with the following error:
    'Launching [myApplication]' has encountered a problem.
    Error occurred while installing the application:
    dyld: Library not loaded: @rpath/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
      Referenced from: /Applications/AIR_SDKS/AIRSDK_4.0.0.1628/lib/aot/bin/isb/isb
      Reason: image not found
    /var/folders/g1/014r026919j9fkv085ypt31r0000gn/T/cmd7720052456329253213.tmp: line 1:  2126 Trace/BPT trap: 5       "/Applications/AIR_SDKS/AIRSDK_4.0.0.1628/lib/aot/bin/isb/isb" "-install" "-apppath" "/var/folders/g1/014r026919j9fkv085ypt31r0000gn/T/eb03981d-5689-4bb5-821c-78ca84086393/Pa yload/[myApplication].app" "-sdkpath" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/ SDKs/iPhoneSimulator7.1.sdk"
    I use AIR SDK 4.0.1628 (the latest version according to the SDK download page today), and it doesn't make a difference if I choose another simulator version (7.0 and 6.1 fail the same way).
    I'm developing in Flash Builder 4.7, on OS X 10.9.2
    Any ideas of how to fix this? Will using the AIR 13 beta help?
    Thanks, Frank

    Thanks for the steer Jason that worked,
    So that would be Apache Flex 4.12 using Flex installer 2.7 will bring the same benefits of AIR SDK for Flex 13...... I basically have to use an installer from a third party to make the commercial product I pay for work to solve the precise problem its sold as solving.
    It's like buying a *******' drill you have to put together yourself.
    I'm gonna get this build finished, then sneak into Flash Builders room while it's having a sleep after a big dinner and smother it with a pillow. It's the kindest thing to do. Ha!
    @DavidDragon,
    Follow these steps:
    http://flex.apache.org/doc-getstarted.html
    However just make sure you use the latest version [4.12.0]

  • No Adobe air app will run Only Flash Web browser....

    So I have re-installed Flash Builder So when I try and run a Adobe air app from the Flash Builder It brings up a prompt everytime saying - If the program is already running, close it before attempting to run. When I kill the Adobe Air debugger in the Task manager it pops up again saying If the program is already running, close it before attempting to run.
    After waiting a few moments from trying again I get a message: Unable to connect to the Application to fetch profile data. Please try profiling the application again.
    With Flash based - web browser apps - they run fine with no issue. How ever its only adobe air - desktop apps that run this way. This is the third time I have installed FB 4.5 on Windows 7 64 bit. last night it was all woprking fine I was able to debug my Flash Application and everything was working  - it has been doing this all day.

    I had the same issue suddenly today
    After hours of scratching my head - and just before re-installing FlashBuilder 4.5 - I found this suggestion
    I had an entry in the "mm.cfg" file:
    PreloadSWF=C:\Users\<USERNAME>\AppData\Roaming\Mozilla\Firefox\Profiles\9us94hs0.default\e xtensions\[email protected]\chrome\content\flashfirebug\flashfirebug.swf
    - I deleted the line and it now works
    ---- aaarrrrggghhh - wasted time
    thanks

  • Flex Air Apps on Blackberry

    I've had a Flex Air app on Playbook since it Adobe first supported Blackberry.  But, I haven't had a client requirement for deploying to Blackberry in a long time.  What is the status on Adobe's support for Blackberry?  On the Air Dev Center, I see no references to Blackberry anymore???
    Can I still build a cross-platform app for latest Blackberry devices (Blackberry 10, Playbook, etc.) using the standard Flex mobile components and Flash Builder 4.6?
    After a brief search on Blackberry's Air page, it looks like they moved to requiring the QNX components, ANEs and a new pure AS3 SDK only.  If I have to re-write code specific for Blackberry now, then it makes no sense for me to offer that to my clients. (unless they only want BB).
    So, where does Adobe stand now with Flex Mobile in Flash Builder deploying to Blackberry 10 and the Playbook?
    I'd appreciate if you could help bring me back up to speed.
    Thanks,
    Don

    Absolutely, Flex works very well indeed and is fully supported on BlackBerry PlayBook and BB10 devices. The free packaging module for Flash Builder is part of the BB SDK for AIR and is supplied by RIM, not by Adobe.
    With Flex you'll of course be using Adobe UI components, which look less native than the BB-supplied "pure AS3" UI components unless you skin them. But they work just fine.

  • How to force an AIR app to close?

    My AIR application is one in a suite of mixed language applications under a common non-AIR front end.  When the parent application exits, all child sub-applications (including the AIR app) should close as well.  Any suggestions how I might communicate the close to the AIR app?

    I believe that the main app contains an array of all children spawned during it's running time. When the "close" event for the main app fires, simply loop over that array and issue close commands for each child app/window.

  • Can't open browser window from RoboHelp AIR app??!

    We've got a RoboHelp course that we're exporting as an AIR app using the  Packager and it works great. We've got an embedded flash file that  needs to open a website in a browser window, but, currently it will only  load the site in a new AIR window...any ideas??

    I'm having this same problem also, although you gave me one option in your reply.  I can't get the "Allow" button to work either. I upgraded to Adobe Reader 9.2, and then is when I noticed I couldn't bring up the websites that I usually could before.  I don't really know what you mean about "Stand Alone Option," but I will try to find out.  I also upgraded to Internet Explorer 8, but I'm not sure if this is when the problem started or when I went to Adobe Reader 9.2.
    I used to be able to get "Allow" to work if I opened the document in IE8 and not in AR 9.2, but now that won't even work. I did email the author of a PDF document I was in today in the hopes he would have the answer, but I'm not sure if I got his email address right, so time will tell on that issue.
    I have a "library" of PDF documents, so I would really like to get this problem fixed.  However, I've spent at least two hours on this issue, and I really don't think it has anything to do with Windows Vista incompatibility; I'm pretty sure it has something to do with Adobe Reader, but that doesn't help much given I have emailed support and, of course, have never received an answer.
    I do know there are a lot of people that are having this exact same problem, but no one has an answer to it.  I've tried to do research on this, but I have a lot of "to do" tasks I need to get done every day, so it's not like I have all the time in the world to try and fix this problem.
    I would appreciate hearing from you if you do ever figure this out. My email address is [email address deleted by host] should you find an answer to this very frustrating problem. Warmly, Corinne Larimore [signature deleted by host]

  • Why? Air App won't appear in Builder

    Hi,
    I am experiencing something odd, and it must be something I
    am doing wrong.
    When I'm using Flex Builder (latest version/updates etc) and
    execute an Air app during development sometimes it won't appear,
    even though there are no compilation errors. Even if I close Flex
    Builder, and re-open, running the buid doesn't display. Its a very
    simple app example app so there is nothing which should cause it to
    fail. Is there a process that I need to kill because it thinks its
    already running? I don't see any processes like that...?
    What's going on?
    Many thanks for your help.

    1) When hovering over the run or debug buttons at the top of
    Flex Builder to start the app, make sure the tooltip displays the
    name of your application rather than some other project's name. It
    normally defaults to running the 'default application' (or the last
    one executed, or currently 'active', I forget); you could be
    running the wrong project/application by accident.
    2) Not sure if this would prevent a new instance from
    running, but check your task manager processes for something
    like... adl.exe (I think?) and kill any you see. You can find the
    actual name by starting the app and from the Task Manager
    "applications" tab, right-click select "Go to process" on your
    application's entry there. It'll bring you to the process running
    that window so you can see the name.
    I've probably had this happen a few times but I can't recall
    what else may have caused it atm.

  • Outlook mailto locks up AIR app until mail window closed

    Hi-
    I'm using the following code to open an outlook email compose window from AIR :
    var request:URLRequest=new URLRequest();
    request.url="mailto:[email protected]";
    navigateToURL(request,"_new");
    this opens the email window, but nothing in the AIR app is accessible until the outlook window is closed. the air app won't even come in front of the outlook window using by using the taskbar.
    any ideas?
    -brett

    I'd just like to add that i'm seeing this behavior as well and would like an answer for it. Also, this does NOT happen on osx 10.5 with mail.app.

  • AIR app rejected by OUYA

    Hi, my first attempt at an OUYA game made in AIR was rejected with several issues that I hope can be addressed:
    1) Adobe's otherwise excellent "GameInput" class does not seem to recognize their "Home" button, which they would like to be used as pause.
    2) Upon leaving the program to follow a URL, the app will restart upon returning. I thought this had more to do with OUYA's OS than AIR because I have no such problems on mobiles.
    3) Accessing textfields does not bring up a virtual keyboard on OUYA. Again, I have no such problems on any mobile.
    I know several people have got some AIR apps on there already, so it depends which reviewer you get. But this was my experience, and I'd like to address some of these grievances to avoid a battle of wills with each update.

    This is the part of the e-mail that referred to pausing:
    "For future submissions OUYA loves to have the system button used for a Pause Menu or return to Main Menu feature. If at some point this could be implemented in-game that would be awesome! Please refer to the Interface Guidelines and In-app Purchasing & Technical Info of the Content Review for further information. (https://devs.ouya.tv/developers/docs/content-review-guidelines)."
    Are there any plans to capture that button? It would make a big difference because I'm having to come up with increasingly elaborate ways to simply pause the game!

  • Adobe AIR app installation issue due to certificate problem on mac 10.9.5

    Im trying to upgrade and then reinstall an Adobe Air application but get the error message failing to install due to a certificate issue.
    The developer says the fix is to uninstall the app and install again but this also fails.
    Checked my machine clock - saved but that didnt work
    The adobe AIR uninstaller simply says I have the latest version? Cant seem to delete and reinstall although other adobe air apps work so I dont think this is the issue
    I have gone through the troubleshooting guide: Troubleshoot AIR installation | Mac OS but still have the issue?
    Any ideas would be great.

    I suspect your Mac OS install was an in place upgrade from an earlier version. This is something I would never even consider with a production machine.

  • Need to 'launch' AIR app from SD card on Samsung Galaxy TABLET...

    April/28/11 at 3pm ET
    Hi to the group...
    Not 100% sure if this is proper forum to ask this, if anyone knows a better one please point me to it via ([email protected])
    Ok. Trying to see if my working .AIR app will run on my pals Samsung Tablet (before I buy one for myself)...
    Dropped the 'AIR' file onto the SD card (I can see it (the AIR file, size correct) via the fileBrowser app but clicking it does nothing.
    Of note AIR is installed in background of the device and it is running.
    Cant see/find an 'Adobe AIR launcher?' icon' anywhere (only see Adobe PDF browser).
    In all my web searching I see 10000 developer related tutorials re: creating an APK file / converting to APK file using Flash Professional ect.  Not what I am looking for...
    I think I am missing something very basic here is there a launcher for AIR apps on Android?
    TIA //GregH

    Hello
    Thank you for your post.
    You cannot throw directly from your external device, however you can once that file is transferred to internal memory.
    please review this guide for instructions on how.
    How to throw (send) music, video or picture files to a DNLA compatible device.
    https://us.en.kb.sony.com/app/answers/detail/a_id/34563/c/65,66/kw/34563

  • How do I use transparent=true in my Air app but still displaying swf ?

    How do I use transparent=true in my Air app but still displaying swf's files ?
    The thing is that I created a customized chrome, and looks nice when it is transparent cause seems to be floating, it works as a browser, but the problem is that when I navigate with it into a page wich contains embedded youtube videos, as in example, or any other swf file... it just doesn't show...
    Any help ? thanks in advance,

    Contact iTunes Support: http://www.apple.com/support/itunes/contact/

  • How can I set connection to external XML file with Dreamweaver to buiild AIR app?

    Hello,
    I try to do simple AIR app in dreamweaver. It's not problem
    to use static data. But I'd like to use dynamic data from external
    XML file. I try to use Spry and evrything works fine in web browser
    but i have problem with loading external XML data into my app in
    AIR. Can I simply transform my spry based html app into AIR?
    What should I add to do this?
    Pawel

    Daniel Lichtenwald wrote:
    What are the requirements and steps for arranging to receive this large file using File Transfer Protocol (FTP)?
    Usually, we don't speak of "receive" when using FTP, since the file is transferred from server to client, so it's more of a case of "download".
    At your end, it's simple. You use an FTP client; under SL, that includes Finder and Safari, so you don't even need to get any additional software.
    At the other end, it's more complicated; the 'sender' must set up an FTP server on his machine.
    Alternatively, you can set up your own Mac as an FTP server, and have the 'sender' connect to you with an FTP client and upload the file; but, if your Mac lives behind a router, then you have more work to do with the router settings.
    That's why it's much easier to use the file sharing services mentioned above -- if they are available in both sender's and receiver's locations. (Keep in mind that some countries block access to all those mentioned -- except perhaps <www.transfer.ro>, of which I know absolutely nothing.)

Maybe you are looking for

  • Report in R12.1.3 opening in some other window

    Hello, When i am opening reports EBS R12.1.3. the text report is opening in some other window, i can not able to copy the text from that window. Also after loggin in into EBS the menu structure is like tree structure and that is not feasible with us.

  • Getting attributes from a XML File, stored in Oracle

    Hello, my problem is the following I have a xml file that looks like that: <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> <root path="H:\musik"> <directory name="Bj�rk - Homogenic" path="H:\musik\Bj�rk - Homogenic"> <file album="Homogen

  • BOM explosion - problem in transferring based quantity from R/3 to APO

    Gurus, i would like to know if what are the reason why sometimes theres a failure in tranferring chnages done on based quantity header of  certain SKu going to APO.  we usually do by running RIMODGEN/RIMODAC2/RIMODDEL program and then lastly the DELT

  • Wireless mouse intermittently drops out/stops working

    I have just bought a Mac Mini. I'm not a fan of Apple keyboards or mice, so I've bought a third party keyboard and I'm using a mouse that I already had (Microsoft Wireless Mouse 1000). Whilst it works fine with my Macbook Pro and PC, with the mini I

  • How do I make an executable file?

    I'm trying to make an exe file outof my class file, I've got WIN XP as OS... Can some one give me step by step help? Regards, Patrik