Accessing Application Descriptor XML on a Mobile Device

When publishing a mobile application with Adobe AIR, it’s possible to access the information in your application’s application descriptor xml file at runtime on a mobile device. Below is an example of accessing the versionNumber and renderMode from the application descriptor.

private var _appDescriptor:XML;
private var _ns:Namespace;
private var _versionNumber:String;
private var _renderMode:String;

_appDescriptor = NativeApplication.nativeApplication.applicationDescriptor;
_ns = _appDescriptor.namespace();
_versionNumber = _appDescriptor._ns::versionNumber;
_renderMode = _appDescriptor._ns::initialWindow._ns::renderMode;

Leave a Reply