Wim Deblauwe
Wim Deblauwe

Reputation: 26858

How can I get the version of the AIR runtime in my AIR application?

In a Flex web application, you can print the version of the flash player that is being used by using:

var version:String = Capabilities.version

According to the docs, this should return the flash player or AIR runtime version, but it does not in my testing. I keep getting the flash player version when running in AIR.

Is there a way to get the AIR version? I am running on AIR 3.2

(I want to display the AIR runtime version in the about box of my application for troubleshooting purpose)

Upvotes: 2

Views: 1308

Answers (1)

JeffryHouser
JeffryHouser

Reputation: 39408

Will this work for you?

To quote:

The NativeApplication object has a runtimeVersion property, which is the version of the runtime in which the application is running (a string, such as "1.0.5"). The NativeApplication object also has a runtimePatchLevel property, which is the patch level of the runtime (a number, such as 2960). The following code uses these properties:

air.trace(air.NativeApplication.nativeApplication.runtimeVersion); air.trace(air.NativeApplication.nativeApplication.runtimePatchLevel);

Upvotes: 2

Related Questions