Problem: After installing a build I want to restart my application with some changes ex- If you want to implement switch workspace kind of functionality.
Solution: We need to create an instance of ProductManager class available in abode.utils package, by using the launch() of this ProductManager we restart the existing application and start the new(this is done by using the application id).
Below is the function restart()
Also make changes in the application descriptor file to allowBrowserInvocation-
{
NativeApplication.nativeApplication.exit();
}
Its very simple :)
Solution: We need to create an instance of ProductManager class available in abode.utils package, by using the launch() of this ProductManager we restart the existing application and start the new(this is done by using the application id).
Below is the function restart()
Also make changes in the application descriptor file to allowBrowserInvocation-
Following is the code for the same:
public function restart():void
{
var mgr:ProductManager = new ProductManager("airappinstaller");
mgr.launch("-launch " + NativeApplication.nativeApplication.applicationID + " " + NativeApplication.nativeApplication.publisherID);NativeApplication.nativeApplication.exit();
}
Its very simple :)

