Hello dear people,
welcome back! Did you know about old code for Flex 3.6x and Adobe Air 2.5x
Look like this:
package
{
import mx.core.Application;
import mx.core.WindowedApplication;
import adobe.utils.ProductManager;
public class reboot
{
public function reboot():void
{
var app:WindowedApplication =
WindowedApplication(Application.application);
var mgr:ProductManager = new ProductManager("airappinstaller");
mgr.launch("-launch " + app.nativeApplication.applicationID + " " + app.nativeApplication.publisherID);
app.close();
}
}
}
I have been tried for fixed problem for Flex 4.6 SDK and Adobe Air 3.1 Fix
I have been replaced "Application" into "FlexGlobals" and changed all import-libraries for Flex 4.6 SDK Support.
Example this:
/**
*
* Reboot of Air App
*
*/
package
{
import adobe.utils.ProductManager;
import flash.desktop.NativeApplication;
import mx.core.FlexGlobals;
import spark.components.WindowedApplication;
public class reboot
{
public function Reboot():void
{
var app:WindowedApplication = WindowedApplication(FlexGlobals.topLevelApplication);
var mgr:ProductManager = new ProductManager("airappinstaller");
mgr.launch("-launch "+app.nativeApplication.applicationID+" "+app.nativeApplication.publisherID);
app.close();
}
}
}
I add line for template-app.xml:
<allowBrowserInvocation>true</allowBrowserInvocation>
I have been tested with Application Air on Flex 4.6 SDK and Air 3.1 SDK. Yeah it works complety. ![]()
And can you visit to my blog of byethost
http://snakemedia.byethost7.com/blog/?p=15
Thanks for help and support!
Happy coding and best regards, Jens E.
Hello dear Coders, can you share my result for Flex 4.6 and Air 3.1 ![]()
I hope you because you can work your restarting air applications.
I am sorry because i have been copied completed code but code tags are crazy. I have been edited always. Can you like my example for your nice wqay with Adobe Air
Thanks and you are welcome ![]()
Have fun! Best regards, Jens
North America
Europe, Middle East and Africa
Asia Pacific