Copy link to clipboard
Copied
Welcome to the latest AIR Runtime and SDK version 24 beta! We've been hard at work adding new features to AIR and we're looking forward to receiving feedback from our development community.
This beta release includes new features as well as enhancements and bug fixes related to security, stability, performance, and device compatibility for AIR Runtime and SDK 24. For full details, please see our release notes
We have added tvOS (v9.2 or later) as a new platform in AIR Beta Channel beginning with AIR SDK 24. With the following modifications, most of the existing content in your AIR application should work seamlessly on tvOS (Apple TV 4th generation and later):
<iPhone>
<InfoAdditions><![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>
3
</string>
</array>
]]></InfoAdditions>
</iPhone>
Following warnings appear if there is a mismatch between the provisioning profile and the UIDeviceFamily value:
Warning: Provisioning profile specified for tvOS, ignoring iOS UIDeviceFamily value(s).
Warning: Provisioning profile specified for iOS, ignoring tvOS UIDeviceFamily value(s).
keycode | keyname | |
---|---|---|
Menu | 0x01000012 | KEYNAME_MENU="Menu" |
Play/Pause | 0x01000020 | KEYNAME_PLAYPAUSE="PlayPause" |
Follow the steps below to create Assets.car using Xcode for generating application icons, launch images, and TopShelf Images for your Apple TV application.
Step 1. On your Mac, open Xcode and choose File > New > Project > tvOS Application > Single View Application. Provide a name to the app and click create. In the general tab of your project, select Deployment Target as 9.2.
Step 2. Click Assets.xcassets in the left column and drag your images to different sections App Icon - Large, App Icon - Small, Top Shelf Image, and Launch Image.
For icon sizes and specifications, follow Apple's guidelines for tvOS icons and images.
Step 3. Run this native app on your tvOS device (tvOS 9.2+) and check if your icons and images appear correctly.
Go to the .app file created in your file system where you created the project — right click on .app file and show package contents.
Copy the Assets.car file from the package. You can package the app with the extracted Assets.car as shown in the following ADT command.
<path to adt> -
package
-target ipa-app-store -provisioning-profile <.mobileprovision> -keystore <.p12> -storetype pkcs12 -storepass <password> <.ipa> <.xml> <.swf> Assets.car
Add the tags mentioned below in the application descriptor file before packaging for your images:
<key>UILaunchImages</key>
<array>
<dict>
<key>UILaunchImageSize</key>
<string>{
1920
,
1080
}</string>
<key>UILaunchImageName</key>
<string>LaunchImage</string>
<key>UILaunchImageMinimumOSVersion</key>
<string>
9.0
</string>
<key>UILaunchImageOrientation</key>
<string>Landscape</string>
</dict>
</array>
<key>TVTopShelfImage</key>
<dict>
<key>TVTopShelfPrimaryImage</key>
<string>Top Shelf Image</string>
</dict>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<string>App Icon - Small</string>
</dict>
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:
Here is the list of version numbers of the tools upgraded in AIR 24.
Tool | Version |
---|---|
SDK Tool | 25.1.7 |
SDK Platform | 24 |
Platform Tool | 24.0.2 |
Android Support Repository | 36 |
Android Google Repository | 32 |
Android Build Tool | 24.0.1 |
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.
For iOS, the APIs listed below are optional if you do not want to handle permissions explicitly in ActionScript. On Android, If you do not want to handle permissions in your application, use targetSdkVersion less than 23 in your application descriptor file.
Sample Snippet
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-permission/.
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
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:
This feature supports Normal and Rectangular texture for miplevel 0 only.
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
For system requirements of the current release of AIR in production, visithttp://www.adobe.com/products/air/systemreqs/
To get the latest Beta build of AIR Runtime and SDK visit Adobe labs
If you would like real-time notification for announcements related to the AIR Beta Channel please follow the Flash Runtime Announcements forums by choosing "Follow this forum" from the right-hand menu on the Forums page.