Captive Runtime Support

If there has been any feature that is most often requested for AIR, this is probably it (if not, it is certainly up there). Captive Runtime will package an application in such a way that it does not require a separate AIR runtime to be installed on a user’s system. This is conceptually similar to how AIR is able to function on iOS — the AIR runtime is packaged along with the application to form a complete package.

Note

Captive Runtime is now available on Windows, OSX, and Android. When packaging AIR for iOS, the process has always bundled the AIR runtime, due to iOS restrictions against external runtimes.

One of the benefits of embedding the AIR runtime along with your application is obvious: the user will not be troubled with an addition download and install if the desktop or device does not already have AIR installed. Another benefit is for those users on tightly controlled networks that do not allow extra runtimes to be installed upon corporate machines. There are drawbacks to this approach, however: embedding the runtime will cause an increase in file size for the distributable package. This can be anywhere from 5–8 megabytes depending upon the platform. A developer must weight both the good and the bad when deciding which distribution method is taken for the runtime — but such choices are always better than no choice at all.

To package an application using this feature on the desktop with Flash Builder 4.6, choose Project > Export Release Build. Be sure that Signed application with captive runtime is selected and hit Next >.

AIR desktop captive runtime

Figure 8-4. AIR desktop captive runtime

To embed the AIR runtime within an Android application with Flash Builder 4.6, choose Project > Export Release Build. Be sure that Signed packages for each target platform is selected and hit Next >.

Export Android project

Figure 8-5. Export Android project

Once you reach the Packaging Settings window for Android, be sure to select the Deployment tab and choose Export application with embedded AIR runtime in order to package and build an APK with the embedded runtime.

Android embedded runtime

Figure 8-6. Android embedded runtime

Note

It is also possible to manually package an Android or desktop application from the command line with the embedded runtime option.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset