0 Replies Latest reply on Feb 15, 2017 11:05 AM by chris.campbell

    12/13/2016 - Release - AIR 24 Runtime and SDK

    chris.campbell Adobe Employee

      Today we're pleased to announce that the next version of AIR is available for immediate download.  This release of AIR provides bug fixes, security updates, and new features.

       

      Below are some of the key features and benefits of AIR 24.  Please see our release notes for full details.

       

       

      New Features:

      Support for Android App Links

      Starting AIR 24, Developers can use Android App Links that allows app developers to associate an application with a web domain they own. The Android App Links feature allows your app to become the default handler for the website URIs you specify in your app.xml

      Follow the below steps to get your application ready for App Links:

       

      1. Create Intent filter for URI in app.xml

      To enable your app to handle links, use intent filters in your app.xml under manifest to declare the URI patterns that your app handles. The following example shows an intent filter that can handle links to https://www.example.in and http://www.example.in

      <manifestAdditions>

          <![CDATA[

              <manifest android:installLocation="auto">

                      ...

                  ...

                  <application android:enabled="true">

                  <activity android:excludeFromRecents="false">

                      <intent-filter>

                          <action android:name="android.intent.action.MAIN" />

                          <categoryandroid:name="android.intent.category.LAUNCHER" />

                      </intent-filter>

                         

                      <intent-filter android:autoVerify="true">

                          <action android:name="android.intent.action.VIEW" />

                          <category android:name="android.intent.category.DEFAULT" />

                          <category android:name="android.intent.category.BROWSABLE" />

                          <data android:scheme="http" android:host="www.example.in" />

                          <data android:scheme="https" android:host="www.example.in" />

                      </intent-filter>

                  </activity>

                  </application>

              </manifest>

          ]]>

      </manifestAdditions>

       

      As shown above, intent filters for app links must declare an android:scheme value of http, https, or both. The filter must not declare any other schemes. To enable link verification for your app, set the android:autoVerify attribute to true on at least one of the web URI intent filters in your app manifest. Read more about the intent filter here.

       

      2. Publish a Digital Asset Links JSON file on your websites to provide verification

      Follow the steps mentioned here to create assetlinks.json file and publishing the same on your website.

      Note:  Developers can receive the url and its arguments in the ActionScript code by registering for NativeApplication InvokeEvent(e.g. NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, invokeHandler); ) To read more about the ActionScript InvokeEvent read here.

      Spherical video support in AIR

      Spherical videos support is added to both Flash Player and AIR from version 24 onward. Spherical videos have a specific meta-data attached to them, which can now be retrieved using the new property provided by the feature. This feature supports equirectangular projection type of videos conforming to https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md.

      This feature is supported on Desktop and Android devices.

      API introduced

      The Object parameter of the onMetaData event provides video metadata information. The feature adds new properties to the parameter. The added property is an array of string type in XML format. Refer code below.

       

      function ns_onMetaData(info:Object):void {

      trace("The matrix of Movie Header Box:"+info.sphericalVideoInfo[0]);

      // info.sphericalVideoInfo provides the related meta-data

      }

       

      Sample Spherical Video Player

      A sample project for Spherical video player can be downloaded from this link in order to understand the use of the metadata to render the spherical video. The sample code makes use of an instance of the context3D, where VideoTexture is used to render video for better performance.

      See the following chart for ActionScript classes in the project.

      Spherical Video.png

      SampleSphericalVideoPlayer class

      This class provides basic controls for the Spherical video functionality.

      SphericalVideo class

      This class creates the context3D instance to render spherical video using VideoTexture

      Projection classes

      These classes are used for generating vertices and indices corresponding to the projection type used.

      Android SDK Upgrade

      Beginning with AIR 24, Android SDK (API Level 24) has been upgraded in the AIR Runtime. Important: If you upload an app on Google Play using AIR SDK 24 and default targetSdkVersion value as 24 in the application descriptor, Google Play does not allow uploading the next version of your app with AIR SDK 23 or earlier (see the error message below). Using targetSdkVersion value as 21 allows you to switch between AIR SDK 24 and AIR SDK 23 for your app updates. Error thrown by Google Play on uploading the next version of your app with AIR SDK 23 or earlier:
      ErrorMessage.png

      Here is the list of version numbers of the tools upgraded in AIR 24.

      SDK Tool25.1.7
      SDK Platform24
      Platform Tool24.0.2
      Android Support Repository36
      Android Google Repository32
      Android Build Tool24.0.1

       

      Permissions on Android and iOS

      Beginning with Android 6.0 (API level 23), the users now need to grant permissions to apps while it is running, not when they install the application. To handle the permissions requests and status, we have introduced Permissions API for Android and iOS. The developers can request permissions for classes like Camera, Microphone, Geolocation, CameraRoll, CameraUI, File, and FileReference. The applications must be packaged with AIRSDK 24 or greater and must have SWF version 35 or later. Apps built using these APIs throw a dialog only on Android 6.0 and later. For Android 5.0 or earlier, you can continue to mention permissions in the application descriptor file.

      On Android, If you do not want to handle permissions in your application, use targetSdkVersion less than 23 in your application descriptor file.

      1. permissionStatus: This property informs whether the application has been granted the required permission or not. This property always returns the status as GRANTED on AIR desktop and Android apps that have targetSDKVersion less than 23. The list of properties for PermissionStatus class includes UNKNOWN,GRANTED, and DENIED. The property UNKNOWN specifies that the permission hasn’t been requested yet or the permission has been denied by user with check box option 'Don’t ask again.'.
      2. requestPermission(): The method requestPermission requests for the permission to be granted to the application. A PermissionEvent is dispatched when the user grants or denies a permission.
      3. PermissionError: Accessing properties and methods of such ActionScript classes without requesting for permission throws Error #3800 PermissionError.
      • While requesting for multiple permissions simultaneously, runtime throws the error below:
        Error #3801: Another permission request is in progress.
      • Accessing the File class without requesting for permissions throws Error #3012, which is the old behavior of File API.

       

      package

      {

          import flash.display.Sprite;

          import flash.display.StageAlign;

          import flash.display.StageScaleMode;

          import flash.events.PermissionEvent;

          import flash.media.Camera;

          import flash.media.Video;

          import flash.permissions.PermissionStatus;

        

          public class codeSnippet extends Sprite

          {

              private var video:Video;

              private var cam:Camera;

              public function codeSnippet()

              {

                  super();

                

                  stage.align = StageAlign.TOP_LEFT;

                  stage.scaleMode = StageScaleMode.NO_SCALE;

                

                  if (Camera.isSupported)

                  {

                      cam = Camera.getCamera();

                    

                      if (Camera.permissionStatus != PermissionStatus.GRANTED)

                      {

                          cam.addEventListener(PermissionEvent.PERMISSION_STATUS, function(e:PermissionEvent):void {

                              if (e.status == PermissionStatus.GRANTED)

                              {

                                  connectCamera();

                              }

                              else

                              {

                                  // permission denied

                              }

                          });

                        

                          try {

                              cam.requestPermission();

                          } catch(e:Error)

                          {

                              // another request is in progress

                          }

                      }

                      else

                      {

                          connectCamera();

                      }

                  }

              }

            

              private function connectCamera():void

              {

                  video = new Video(640, 480);

                  video.attachCamera(cam);

                  addChild(video);

              }

          }

      }

       

      For training resource on Android permissions, see https://developer.android.com/training/permissions/index.html.

      For information about iOS permissions, see Apple's documentation https://developer.apple.com/ios/human-interface-guidelines/interaction/requesting-permissi on/.

      Points to note

      • A new feature for iOS 10 submissions requires you to add the 'purpose string' to your app when accessing a user's private data such as Camera or Photos. For information about providing keys in your app descriptor file, see Information Property List Key Reference | Cocoa Keys.
      • While requesting for multiple permissions simultaneously, runtime throws the error below:
        Error #3801: Another permission request is in progress.
      • Accessing the File class without requesting for permissions throws Error #3012, which is the old behavior of File API.

      Custom fonts support for StageText on iOS and Android

      Beginning with AIR 24, we have introduced support for Custom fonts on StageText for iOS and Android. Earlier, StageText was created with specific system fonts. With the introduction of this feature, the AS developers now have more flexibility in using fonts apart from the ones present in system. The developers can use ttf and otf font files. The changes required to use custom fonts are listed below.

      1. Changes required in the application descriptor xml.

      Note: To access this functionality, the Namespace value in the app descriptor must be 24.0 or greater.

      <application>

      ...

      ...

      <embedFonts>

           <font>

                <fontName>FontID1</fontName>

                <fontPath>path_to_custom_font_fileName1.ttf</fontPath>

           </font>

           <font>

                <fontName>FontID2</fontName>

                <fontPath>path_to_custom_font_fileName2.ttf</fontPath>

           </font>

      </embedFonts>

      ...

      ...

      <application>

      2. Changes required in the ActionScript code

      The developers can provide any value under fontName tag, for example FontID1 here.

      public function CustomFonts()

      {

           label = new StageText();

           label.fontFamily = "FontID1";

           label.textAlign = "right";

           label.stage = stage;

           label.viewPort = new Rectangle(20, 20, 90, 90);

      }

      Known Issues

      • For packaging the .apk file using Flash Builder, the developer needs to provide absolute fontPath.
      • With Java 1.6 on Windows, otf files are not rendered for IPAs.

      Asynchronous texture upload for mobile

      Till AIR 23, the texture upload was synchronous. Therefore, the developers had to wait till the new texture was uploaded successfully.

      With AIR 24, you can now upload textures asynchronously while the current texture is being rendered. This ensures a better UI performance for AIR applications and a smoother user experience.

      On successful completion of asynchronous texture upload, a TEXTURE_READY event will be generated. Asynchronous upload of texture data for all the texture formats is done using the following two new APIs:

      1. uploadFromBitmapDataAsync( source:BitmapData, miplevel:uint = 0)
      2. uploadFromByteArrayAsync( data:ByteArray, byteArrayOffset:uint, miplevel:uint = 0 )

      This feature supports Normal and Rectangular texture for miplevel 0 only.

      Anti-Aliasing using configureBackBuffer() on iOS

      Anti-Aliasing is useful in improving the perceived image quality in applications. Hardware base Multisampling Anti-Aliasing (MSAA) is now available for iOS using Contex3D.configureBackBuffer.This feature was previously available for Desktop and Flash Player. To enable MSAA, set the level from 0 to 2 using the configureBackBuffer. The following are the effect of levels of antialiasing values:

      0=1 subsample, No antialiasing

      1=2 subsamples, medium antialiasing

      2=4 subsamples, high antialiasing.

      If you provide higher level of antialiasing (more than 2), the level will be clipped to either the maximum level of anti-aliasing supported by GPU or the value of 2.

      Note: This feature is currently not available on Android using configureBackbuffer.

      API assumptions and dependencies

      1. Anti-Aliasing is not available in software mode rendering.
      2. The application use extra GPU memory when using anti-aliasing and hence can cause slight performance degradation.

       

       

      Fixed Issues

      • Starling.display.Image mask is not rendering on mobile when rendered with starling.textures.RenderTexture (4196946)
      • Exponential Increase in GDI object handler due to which application quits unexpectedly (4194045).
      • [Windows 7]Memory leak is observed when using Cairo and HTML5 canvas in AIR Desktop Runtime(4192545).
      • [Mac] Application quits unexpectedly on Mac with OS X exception (SIGSEGV) KERN_INVALID_ADDRESS(4195975).
      • [Mac] FLEX AIR application (digi.me) quits unexpectedly (4152837).
      • [Mac] AIR application quits unexpectedly on network changes or screen invalidation(4011481).
      • [Android N] AIR apps are not able to recognise display changes & font size as per the new Android N features (4186054)
      • Android - Status bar appears when soft keyboard opens and then stays indefinitely (4184348)
      • setAspectRatio(StageAspectRatio.PORTRAIT) doesnt work if the device is held in landscape orientation [4197162]
      • [iOS] Capabilities.cpuArchitecture returning wrong value for iOS Simulator [4142569]
      • [iOS] UIDeviceFamily values are now integers(4176499)
      • [Android] While using Android Video, video will hang for a second when other operations occur such ad addChild (4161877).
      • [Android]Video blacks out and only audio plays when user stops and restarts the video ( 4194916)
      • [Android] HLS video using video texture is not playing(4186193)
      • [iOS] Background sound stuttering when going idle (4184841).
      • [iOS] GameInput API now supports iOS8 devices.
      • [Android] While using immersive mode on devices having soft navigational keys, pink bar appears under that navigational area (4100625).
      • Circled Digit characters shown as boxes when used in a flex project inside <s:label> (4186628)

       

       

        Known Issues:

      • Adobe AIR_64 Helper and ExtendedAppEntry Template64 creates problem while code signing MAC Captive App.(4189809)
      • [iOS] Crash when trying to access function arguments (4117964)
      • TextField: delay after creation of first TextField (4133187)
      • [iOS] Failed to find class DTiPhoneSimulatorSystemRoot at runtime on trying to install App on iOS 10.0 Simulator (4186457).
      • Interfaces don't function on iOS in AIR23 when shared between swf's (4194914)

       

       

      Download Locations:

       

      AIR runtime for Windows: 24.0.0.180 Runtime Download

      AIR runtime for Macintosh: 24.0.0.180 Runtime Download

       

      AIR SDK & Compiler for Windows: 24.0.0.180 SDK & Compiler Download

      AIR SDK & Compiler for Macintosh: 24.0.0.180 SDK & Compiler Download

       

      Note: To provide all the all the necessary tools for our developers in one place and avoid having to download multiple components, we are packaging Adobe AIR 24 SDK and ActionScript Compiler 2.0 in a single SDK called “Adobe AIR 24 SDK & Compiler”.

       

      AIR SDK (Compatible with Flex) for Windows: 24.0.0.180 SDK Windows Download

      AIR SDK (Compatible with Flex) for Macintosh: 24.0.0.180 SDK Macintosh Download

       

      Previous versions of the AIR runtime and SDK can be found on the Archived AIR SDK and Runtimes page