Hi,
I've been trying to launch a separate Air Application through my current Air Application.
Both apps are compiled using the Adobe Air 2.0 SDK.
The methods I have found so far involve passing the Publisher ID in addition to the Application ID, but I believe the Publisher ID became redundant past Air 1.5.3?
Below is my current implementation whic seems to correctly ascertain the Air Application's version number, but when I try to launch it, nothing seems to happen.
private static var _air:Object;
private static var _loader:Loader;
private static var appID:String = "someOtherAirApplication";
private static var pubID:String = NativeApplication.nativeApplication.publisherID;
public static 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);
}
private static function onInit(event:Event) : void
{
_air = event.target.content;
//the pubID argument resolves to and empty string ""
_air.getApplicationVersion(appID, pubID, versionDetectCallback);
}
private static function versionDetectCallback(version:String) : void
{
if(version != null)
{
_air.launchApplication(appID,pubID);
}
}
I have changed the app-config.xml (app descriptor) on the application I am trying to load to allow browser invocation.
The version number of the app descriptor of my application I am trying to load is "V1" which the versionDetectCallback seems to pickup. If this is the case I would expect to be able to launch it but this doesn't seem the case.
Any ideas?