Launch desktop AIR app from swf button

I have a very simple task. I have an AIR app installed. All I want to be able to do is launch it from a swf button. I am building the swf button in Flash CS6. How do I do this? All it has to do is launch the app. No fancy stuff, no installs, no validation. Just launch the darn app. I can't seem to find a simple solution. Thanks!

Not sure exactly why yet, but I finally found something that worked!!!! Hope this saves someone else hours of research:
myCustomBtn.addEventListener(MouseEvent.MOUSE_DOWN, versionDetectCallback);
var _air:Object;
var _loader:Loader;
var appID:String = "thenameofmyapp";
var pubID:String = " "; 
function loadAir() : void
_loader = new Loader();
var loaderContext:LoaderContext = new LoaderContext();
loaderContext.applicationDomain = ApplicationDomain.currentDomain;
_loader.contentLoaderInfo.addEventListener(Event.INIT,onInit);
_loader.load(new   URLRequest("http://airdownload.adobe.com/air/browserapi/air.swf"),loaderContext);
function onInit(event:Event) : void
_air = event.target.content;
        //the pubID argument resolves to and empty string ""  
        _air.getApplicationVersion(appID, pubID, versionDetectCallback);
function versionDetectCallback(event:MouseEvent) : void
       _air.launchApplication(appID,pubID);
loadAir();

Similar Messages

  • Launching an AIR app from another (when offline)?

    I have a pair of AIR applications that are meant to work
    together as part of an application suite. One feature is that a
    user should be able to click a button in APP_1 and launch APP_2 (if
    installed). To do this I created a "LaunchButton.swf" that loads
    "air.swf". This works GREAT when the user is online and "air.swf"
    is able to be loaded from "
    http://airdownload.adobe.com/air/browserapi/air.swf".
    I tried to copy "air.swf" locally and use that instance but I am
    guessing that it doesn't work due to security restrictions.
    If there are any AIR engineers reading this (Oliver?) please
    let me know if there is a solution to "Launching an AIR app from
    another (when offline)?"
    Thanks!

    I think theoretically it shouldn't work, and doesn't by the
    response you give. Remember a functional work around isn't always a
    fix. What you've essentially done is loaded the air.swf into a
    sandbox bridge, bridging it between a web sandbox and an
    application sandbox, therefore you're able to call its methods
    without security errors. However, if the air.swf loads in another
    swf, maybe a helper swf, you won't be able to access any methods in
    that swf, neither will the air.swf. To my understanding, it's not
    grandfathered into the sandbox bridge, but retains its web sandbox.
    Before going crazy about the bad news I may have just given,
    wait until Ted returns to give you a response. I could be way off
    par here :) Good luck!

  • Desktop AIR app debug build running from cache?

    I'm new to flash builder (using 4.5 for os x) and I've been working on a desktop AIR app for the last week.  I've been running into a strange issue when deugging my app.  Every once and a while (maybe 4-5 times a day) after I make changes to my code and I make a new debug build, a much older version of the app runs when I run the app with or without the debugger, or even if I export for release.  It's as though its running (or building) from the cache, except I'm building a desktop app and I'm not testing the swf on a browser.  I've turned off "Build Automatically", cleaned the project and build again but no changes are reflected.  I can't figure out how, but after cleaning, quitting flash builder, restarting, cleaning, building again, etc.. numerous times suddenly I will see the current version of the app back up and running.  I cannot for the life of me figure out how to quickly resolve the issue, or what exactly is fixing it. Every time it seems like something else triggers FB to refresh the build.  I can even run the debugger and step through my current code while seeing completely different results on the screen.
    Has anyone else run into this issue?  Anyone know what I may be missing?  Are there settings I need to change besides "Build Automatically"?  Thanks for your help,
    Nick

    Thanks for the answer.  How exactly Flash Builder is running is a little clearer to me now.  I checked and the timestamps were indeed being updated correctly.
    This helped me to look elsewhere for the issue.  I actually now think it may have to do with mobile home sync that I have going through OS X.  Whenever the sync runs, FB seems to launch an outdated (as in hours ago) version of the app.  Despite the fact that the sync is not pulling in new files, it seems to be the issue.  If i stop the sync I start seeing the current version of the app again when I run the debugger.  So I think its just the OS causing my problem (although I still don't completely understand why exactly the issue would manifest itself in FB).  Fortunately I can recreate the issue every time I run the sync, so the problem is consistent at least!
    Thanks again for your help.

  • 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 to read http cookies from adobe desktop Air app using flex/flash builder in AS 3.0 ??

    Im developing Adobe desktop air app where i need to read the session id from the cookie of a http request.
    I have found a property called URLRequest.manageCookies supported by AIR so i Hope there should be a way to read the cookies as well. Im Using Flash Builder 4.5
    Please provide any reference code or guide me for this research;
    searched a lot regarding on this web.
    Most results lead to local shared object or reading cookies fr a webpage using javascript and ExternalInterface.
    I want to read http cookies not Local shared Object and in a desktop AIR application.
    Im using Flash builder 4.5
    Thanks
    Hari

    Sorry, but you are at the wrong forum; this one is only for discussions on the forums themselves. The Air forums are here:
    http://forums.adobe.com/community/air

  • Any solution for Launching Air Apps from Sandboxed Chrome and Safari Browsers?

    Before we go and build our own plug-in (Ugh!)...
    As of early this year, we could no longer launch our Air application from Chrome. Now Safari (with Mavericks) has Sandboxed Flash with their browser and it will no-longer launch our application.
    Does anyone have any helpful advice (beyond building our own plug-in)?
    Thanks,
       Leo

    For the Chrome issue, I added instructions on how to manually enable an exception so that the plugin could run. The easier way to get it working is to have them install an Air app from the browser using a Flash badge. This didn't work for us since our app needs a native installer. Another option is to have our user install another Air app from our site. The exception is created for the site and the Air plugin so even though it would be a different app, once they allowed the plugin on our site, we could launch the natively installed app after that.
    I just discovered the Safari sandbox issue on Mavericks. I haven't tried either of these approaches on Safari yet. Is it the AdobeAAMDetect plugin in Safari settings that needs to be allowed?
    http://support.trainerroad.com/entries/22547739-How-do-I-allow-TrainerRoad-to-be-launched- from-the-website-

  • Launching another iOS AIR app from iOS AIR App

    Hi
    Ideally we would like to be able to launch another AIR iOS from our AIR iOS.  Is it possible to do this with AIR?  I understand you can do it natively.  We would also need to pass a few parameters: such as authentication ID and a URL.
    Potentially we need to be able to do this in Android too.
    Thanks
    Ben

    Yes. you can have following chunk in your infoAdditions
    <key>CFBundleURLTypes</key>
       <array>
        <dict>
         <key>CFBundleURLSchemes</key>
         <array>
          <string>appA</string>
         </array>
        </dict>
       </array>
    then from another AIR iOS application you can call navigateToURL("appA://thisDataWillBeReceivedByAppA")
    I have written an Article which lets AIR iOS applications implement Facebook Single Sign-On It uses the same techniques. You can follow http://www.saumitrabhave.com/2011/10/facebook-single-sign-on-for-air-ios.html for more details.
    Thanks,
    Saumitra

  • Flex wont launch my AIR app

    Now whenever I launch my air app I get this error:
    Process terminated without establishing connection to debugger.
    Command:
    "C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin\adl.exe" D:\fromLapTop\lapDocs\Flex\Workspaces\MothersRings\MothersRingsAir\bin-debug\MothersRings Air-app.xml D:\fromLapTop\lapDocs\Flex\Workspaces\MothersRings\MothersRingsAir\bin-debug
    Output from command:
    error while loading initial content
    I verified everything was in the locations specified. I also search on google and found a post somewhere that said I should change the xml namespace I tried: http://ns.adobe.com/air/application/1.1 and http://ns.adobe.com/air/application/1.5 but then it says it can't resolved <mx:WindowedApplication> as a component.
    Here is the source code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
    modalTransparencyColor="#663333"
    backgroundGradientAlphas="[1.0, 1.0]"
    backgroundGradientColors="[#663333, #663333]"
    verticalAlign="middle" horizontalAlign="center" width="100%" height="100%"
    applicationComplete="onApplicationComplete()">
    <mx:Script>
    <![CDATA[
    private static const neededForCompilation:AirGeneralImplementation = null;
    private function onApplicationComplete():void
    var can:MothersRings = new MothersRings();
    this.addChild(can);
    //can.labelMessage = "Loaded in an AIR Application ";
    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    ]]>
    </mx:Script>
    <mx:Style source="style/style.css"/>
    <mx:Style>
    .header{
    fontSize:"18";
    fontWeight:"bold";
    TileList{
    backgroundColor:#996666;
    borderColor:#330000;
    rollOverColor:#cc9999;
    borderThickness:1;
    </mx:Style>
    </mx:WindowedApplication>
    Can anyone help me out?
    Thanks!!

    I agree with the first response...I usually see this error when I have already launched a test of the project (clicked the play button) and forgot to close it.  The issue you saw on the Internet will usually cause it not to run or do anything except just sit there.  I have to change that setting every  time I go from an XP to Vista machine...even though the both have AIR 1.5 on them.  If I don't change it, it doesn't run which bothers me from a distribution concern...I hope it will run regardless of the OS.
    HTH
    Dave

  • Problem starting AIR app from windows server 2003

    Hello,
    I have an AIR app that I am trying to run using a c#
    webservice under Win 2003.
    I am starting the application process (air .exe file) as the
    "Network Service" user which has full-rights on the app-folder and
    app-working folder. The problem is that once with the applications
    the "Adobe AIR Updater.exe" process is starting to (using the same
    user N.S.) and both of the processes stop responding.
    I have tried to start the process as "Local Service" with
    "Desktop Interaction" too but unfortunately with no result.
    I must tell you that under XP and Vista it runs perfect...
    Is there any security issue related to win 2003 or any way i
    can start an air app from command line.
    Also i am interested why "Adobe Air Updater.exe" is starting
    ?

    Not sure about  copying eulaAccepted file from one location to another - that would really depend on which user account your service is running under.
    A better approach (IMHO), is to open the services window (My Computer | <right-click> | Manage, then navigate to Services and expand the tree) so you can see your service on the RHS.
    Stop your service, then inspect it's properties, select the 'Log on' tab, then check the checkbox which says "Allow system to interact with desktop". Apply the change, then restart your service.
    next time the AIR runtime prompts you to accept the EULA, the window will appear on the screen, so you can click "I accept".
    After accepting, reverse the procedure which allowed the service to interact with the desktop, and make sure that you have modified the registry to prevent AIR from updating as mentioned in:
    http://help.adobe.com/en_US/AIR/1.5/air_admin/WS5b3ccc516d4fbf351e63e3 d11c0f59823a-7ff0.html
    You should be all set.

  • Start Air app from shell (adb shell am start)?

    SDK: 2.6
    Im trying to auto start my app when I push it to a device for testing. Im using the adb shell with the "am start" command.
    Example In Bash: $am start air.SampleProject
    Returns the error:
    Starting: Intent { act=android.intent.action.VIEW dat=air.SampleProject}
    Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=air.SampleProject flg=0x10000000 }
    Help?
    I have found you have to start the start or maybe add something else int he manifest but I cant figure it out. Is there a way to start a air app from shell?

    Using ADL
    $ adl releaseDirectory/yourApp-app.xml
    That's it. Just make sure you have your SWF file to be called from the application descriptor.

  • What's the difference on StageWebview in Mobile and Desktop AIR apps?

    Hi,
    What's the difference between StageWebView in an AIR mobile and
    AIR desktop app? (AIR 3.9 SDK)
    I have the problem that in a StageWebView related feature is working and on mobile but not on desktop AIR apps.
    The feature lets users login into a website and post to the forum - on mobile it seems that the cookie/session is not found.
    What could be the reason for that?
    Any ideas welcome!

    I would recommend against using useNative = true in Windows, because that means the behaviour and presentation of the page is very unpredictable, since the user can have pretty much any version of IE from 6 to 11 and beyond. That's more than a decade worth of different (and some really old and buggy) versions of Internet Explorer. The embedded WebKit in AIR could use an update (it's a bit old), but it's still a lot better than the wild territory of native IE ;-). I'm glad the AIR team listened to us and in AIR 3.9 they gave us back the option to not use native IE in Windows (in some of the previous versions, such as AIR 3.6, 3.7 and 3.8, only the IE engine was available to StageWebView, which forced me to use AIR 3.5 for Windows versions of my application, since the IE engine provided all sorts of problems).
    Anyway, I don't understand your post very well. First you say "is working and on mobile but not on desktop AIR apps". From that I get that your page is working on mobile but doesn't work properly on desktop, but then you say "on mobile it seems that the cookie/session is not found". That contradicts the other sentence, since now you're saying it doesn't work properly on mobile.
    Which one is true?

  • Mobile app to desktop air app

    How do I convert my mobile air app to a desktop air app.  I basically just want the app to look just like the emulator version but maybe with a 1024x768 view instead (tablet sized).

    When you build the release build of the application, you can choose "AIR for desktop" and the app looks exactly like in the emulator.
    Otherwise you have to port some of your application components to an AIR project (if you want the full AIR desktop functionality).

  • How to compile an .air app from the ADT command line?

    Hi,
    I would like to compile an .air app from the ADT command line.
    Does anybody have an example?
    I don't know how to add the AIR SDK path and a folder to it.
    Is there a generator for the command line availabble?
    Thanks

    Correction: it seems that Applescripts and some similar scripts can be called from the command line using "osascript scriptname". I don't speak automator but you might like to try it. osascript seems to come with severe limitations though, for instance it doesn't allow user interaction such as dialogue boxes.

  • Can you launch an android app from an android app built with air?

    Hi I might a have project coming up soon where one of the requirements is that the android air application can launch another application on the device...
    In pure java this would look something like this....
    Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.rpg.rbar");
    startActivity(LaunchIntent);
    Does anyone no if I can perform a similar method using as3
    Thanks
      Aidan

    Try the below.  Found this at the below link. 
    http://www.blogbyben.com/2013/04/launching-android-app-from-adobe-air-app.html
    var url:String = ("intent:#Intent;" + "action=android.intent.action.MAIN;" + "category=android.intent.category.LAUNCHER;" + "component=com.android.settings/.Settings;" + "end");  navigateToURL(new URLRequest(url));
    Question I have is, is there any way to get a list of currently installed apps?

  • Launch native air app(desktop) using URI scheme

    Have a air application for handling files. Is it possible to launch using URI.
    The same question has been asked on stack overflow without definite answer
    http://stackoverflow.com/questions/8956316/open-a-native-air-app-via-url

    It does have half an answer. SWFs can request loading AIR applications so they suggested embedding a SWF on the page which would be able to launch your AIR application. Your link would need to fire off some JavaScript to use the ExternalInterface with the SWF to relay your request inside the SWF. 
    If you really want it on Windows for example then you'll need to register your URI, the example should be self explainatory:
    http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx

Maybe you are looking for