11/11/2016 - Beta - AIR 24.0.0.162
welcome latest air runtime , sdk version 24 updated beta! we've been hard @ work adding new features air , we're looking forward receiving feedback our development community.
this beta release includes new features enhancements , bug fixes related security, stability, performance, , device compatibility air runtime , sdk 24. full details, please see our release notes
new , updated features
spherical video support in air
spherical videos support added both flash player , air version 24 onward. spherical videos have specific meta-data attached them, can retrieved using new property provided feature. feature supports equirectangular projection type of videos conforming https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md.
this feature supported on desktop , android devices.
api introduced
the object parameter of onmetadata event provides video metadata information. feature adds new properties parameter. added property 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 related meta-data
}
sample spherical video player
a sample project spherical video player can downloaded link in order understand use of metadata render spherical video. sample code makes use of instance of context3d, videotexture used render video better performance.
see following chart actionscript classes in project.
samplesphericalvideoplayer class
this class provides basic controls spherical video functionality.
sphericalvideo class
this class creates context3d instance render spherical video using videotexture
projection classes
these classes used generating vertices , indices corresponding projection type used.
instanced drawing on air desktop ( beta only)
instanced drawing feature available air mobile available in air desktop. feature helps developers use a model of graphical object , render multiple times in single frame. reduces draw calls , hence rendering , overall performance smoother.
similar air mobile, use feature on desktop ,developers can use createvertexbufferforintance() , drawtriangleinstanced() apis.
context3d::createvertexbufferforinstances( numelements:int, data32perelement:int, instancesperelement:int, bufferusage:string = "staticdraw", ):vertexbuffer3d;
use vertexbuffer3d object upload set of instance data rendering context. vertex buffer contains data needed render each instance in scene geometry. vertex buffers instance data provide attributes common vertices of instance , serve input vertex shader program.
context3d::drawtrianglesinstanced( indexbuffer:indexbuffer3d, numinstances, firstindex:int=0, numtriangles:int=-1 ):void;
agal version 3 “iid” register can downloaded from:
agalv3 available @ : https://github.com/adobe-flash/graphicscorelib/tree/master/src/com/adobe/utils/v3
assumptions , dependencies
1) feature supported on devices support standard extended profile
2) feature available in air mobile , desktop.
apple tv support
we have added tvos (v9.2 or later) new platform in air beta channel beginning air sdk 24. following modifications, of existing content in air application should work seamlessly on tvos (apple tv 4th generation , later):
- to create package tvos, developers need provide valid provisioning profile tvos. provisioning profile different 1 used ios. packaging command , targets used packaging tvos applications remain same ios. refer these resources more details: exporting app testing (ios, tvos, watchos), maintaining identifiers, devices, , profiles, , app programming guide tvos.
- developers must provide uidevicefamily value of 3 in application descriptor tvos platform. however, if value not provided , tvos provisioning given, uidevicefamily value equal 3 added automatically in final ipa generated.
<iphone>
<infoadditions><![cdata[
<key>uidevicefamily</key>
<array>
<string>
3
</string>
</array>
]]></infoadditions>
</iphone>
following warnings appear if there mismatch between provisioning profile , uidevicefamily value:
warning: provisioning profile specified tvos, ignoring ios uidevicefamily value(s).
warning: provisioning profile specified ios, ignoring tvos uidevicefamily value(s).
apple tv siri remote support
- transformgestureevent.gesture_directional_tap - a new uidevicefamily gesture has been introduced support directional tap siri remote. this helps in navigating through collection of items one-by-one. direction of tap can judged referring offsetx , offsety values of event object similar swipeevent.
- transformgestureevent.gesture_swipe - swipe events supported on apple tv similar other platforms. however, values of stagex , stagey properties remain fixed received native operating system, center of screen. air developers can read new velocity property in swipe events manage fast movements based on strength of swipe.
- mouse events , touch events - mouse events on apple tv generated on siri remote click, , limited click, mouse_up, , mouse_down. touch events generated on siri remote touch when multitouch.inputmode set touch_point.
- menu , play/pause buttons - in addition siri remote touch surface support, have added support menu , play/pause buttons. air developers can subscribe keyboardevents.key_down , key_up events listen these button presses.
keycode keyname menu 0x01000012 keyname_menu="menu" play/pause 0x01000020 keyname_playpause="playpause"
stagetext support apple tv
stagetext on apple tv takes focus default. manage focus between different objects in application keep note of below points:
- to override default focus stagetext, or assign focus other display object use stage.focus
- to assign focus stagetext, use stagetext.assignfocus()
ane support apple tv
ane tvos can packaged adding new platform "appletv-arm" in extension.xml.
<platform name=
"appletv-arm"
>
<applicationdeployment>
<nativelibrary>sample.a</nativelibrary>
<initializer>sampleextinitializer</initializer>
<finalizer>sampleextfinalizer</finalizer>
</applicationdeployment>
</platform>
you need place native .a , library.swf in folder called appletv-arm.
sample ane packaging command:
adt -
package
-target ane sampleane.ane extension.xml -swc samplelibrary.swc -platform appletv-arm -c appletv-arm library.swf sample.a
creating icons , images apple tv applications
follow steps below create assets.car using xcode generating application icons, launch images, , topshelf images apple tv application.
step 1. on mac, open xcode , choose file > new > project > tvos application > single view application. provide name app , click create. in general tab of project, select deployment target 9.2.
step 2. click assets.xcassets in left column , drag images different sections app icon - large, app icon - small, top shelf image, , launch image.for icon sizes , specifications, follow apple's guidelines tvos icons , images.
step 3. run native app on tvos device (tvos 9.2+) , check if icons , images appear correctly.
go .app file created in file system created project — right click on .app file , show package contents.
copy assets.car file package. can package app extracted assets.car shown in following adt command.
<path adt> -
package
-target ipa-app-store -provisioning-profile <.mobileprovision> -keystore <.p12> -storetype pkcs12 -storepass <password> <.ipa> <.xml> <.swf> assets.car
add tags mentioned below in application descriptor file before packaging 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>
points note
the maximum size tvos app bundle 200 mb.
accessing file system, except cache directory, throws error 3001: file or directory access denied. applications on tvos have write access in cache directory. purge-able operating system when space low.
creating cursor-like implementation in app on tvos can lead app rejection apple, not comply human interface guidelines apple tv.
apple tv applications 64-bit only.
the air property soundmixer.audioplaybackmode defaults voice on apple tv. changing value media not have effect.
apple tv not support clipboard.
known issues
tvos applications not upload apple app store.
local shared object .sol file not created on tvos because of filesystem issues.
gameinput apis may work on apple tv air applications can unstable.
the air property microphone.issupported returns true instead of false.
ane workflows tvos not work.
swipe velocity android , ios
starting air 24, air developers can read velocity property swipe events on android , ios estimate strength of swipe. value in pixels per second.
android sdk upgrade
beginning air 24, android sdk (api level 24) has been upgraded in air runtime.
important: if upload app on google play using air sdk 24 , default targetsdkversion value 24 in application descriptor, google play not allow uploading next version of app air sdk 23 or earlier (see error message below). using targetsdkversion value 21 allows switch between air sdk 24 , air sdk 23 app updates.
error thrown google play on uploading next version of app air sdk 23 or earlier:
here list of version numbers of 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 |
permissions on android , ios
beginning android 6.0 (api level 23), users need grant permissions apps while running, not when install application. handle permissions requests , status, have introduced permissions api android , ios. developers can request permissions classes camera, microphone, geolocation, cameraroll, cameraui, file, , filereference. applications must packaged airsdk 24 or greater , must have swf version 35 or later. apps built using these apis throw dialog on android 6.0 , later. android 5.0 or earlier, can continue mention permissions in application descriptor file.
for ios, apis listed below optional if not want handle permissions explicitly in actionscript. on android, if not want handle permissions in application, use targetsdkversion less 23 in application descriptor file.
- permissionstatus: this property informs whether application has been granted required permission or not. property returns status granted on air desktop , android apps have targetsdkversion less 23. list of properties permissionstatus class includes unknown,granted, , denied. property unknown specifies permission hasn’t been requested yet or permission has been denied user check box option 'don’t ask again.'.
- requestpermission(): the method requestpermission requests permission granted application. permissionevent dispatched when user grants or denies permission.
- permissionerror: accessing properties , methods of such actionscript classes without requesting permission throws error #3800 permissionerror.
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)
{
// request 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 ios permissions, see apple's documentation https://developer.apple.com/ios/human-interface-guidelines/interaction/requesting-permissi on/.
points note
- a new feature ios 10 submissions requires add 'purpose string' app when accessing user's private data such camera or photos. information providing keys in app descriptor file, see information property list key reference | cocoa keys.
- while requesting multiple permissions simultaneously, runtime throws error below:
error #3801: permission request in progress. - accessing file class without requesting permissions throws error #3012, old behavior of file api.
custom fonts support stagetext on ios , android
beginning air 24, have introduced support custom fonts on stagetext ios , android. earlier, stagetext created specific system fonts. introduction of feature, developers have more flexibility in using fonts apart ones present in system. developers can use ttf , otf font files. changes required use custom fonts listed below.
1. changes required in application descriptor xml.
note: to access functionality, namespace value in app descriptor must 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 actionscript code
the developers can provide value under fontname tag, 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 .apk file using flash builder, developer needs provide absolute fontpath.
- with java 1.6 on windows, otf files not rendered ipas.
asynchronous texture upload mobile
till air 23, texture upload synchronous. therefore, developers had wait till new texture uploaded successfully.
with air 24, can upload textures asynchronously while current texture being rendered. ensures better ui performance air applications , smoother user experience.
on successful completion of asynchronous texture upload, texture_ready event generated. asynchronous upload of texture data texture formats done using following 2 new apis:
- uploadfrombitmapdataasync( source:bitmapdata, miplevel:uint = 0)
- uploadfrombytearrayasync( data:bytearray, bytearrayoffset:uint, miplevel:uint = 0 )
this feature supports normal , rectangular texture miplevel 0 only.
anti-aliasing using configurebackbuffer() on ios
anti-aliasing useful in improving perceived image quality in applications. hardware base multisampling anti-aliasing (msaa) available ios using contex3d.configurebackbuffer.this feature available desktop , flash player. enable msaa, set level 0 2 using configurebackbuffer. following effect of levels of antialiasing values:0=1 subsample, no antialiasing1=2 subsamples, medium antialiasing2=4 subsamples, high antialiasing.if provide higher level of antialiasing (more 2), level clipped either maximum level of anti-aliasing supported gpu or value of 2.note: feature not available on android using configurebackbuffer.api assumptions , dependencies
- anti-aliasing not available in software mode rendering.
- the application use gpu memory when using anti-aliasing , hence can cause slight performance degradation.
known issues
- starling.display.image mask not rendering on mobile when rendered starling.textures.rendertexture (4196946).
- [ios] failed find class dtiphonesimulatorsystemroot @ runtime error on trying install app on iphone simulator (4186457).
fixed issues
- setaspectratio(stageaspectratio.portrait) doesnt work if device held in landscape orientation [4197162]
- [ios] capabilities.cpuarchitecture returning wrong value ios simulator [4142569]
- on android, application crashes while accessing of properties or methods of file , filereference class before requesting permissions [4186592]
- on android, excluding permission application descriptor file returns permissionstatus unknown [4186594]
- on android, cameaui not work targetsdkversion 24 [4186610]
- on ios, cameraroll not work when user taps 'allow' on requesting permission [4186588]
- on ios, application crashes while requesting geo.setupdatehandler [4186586]
- the air property microphone.issupported returns true instead of false on apple tv [4186458]
authoring flash player 24 , air 24
- update application descriptor namespace 24
- swf version should 35
system requirements
for system requirements of current release of air in production, visithttp://www.adobe.com/products/air/systemreqs/
about beta channel
to latest beta build of air runtime , sdk visit adobe labs
if real-time notification announcements related air beta channel please follow flash runtime announcements forums choosing "follow forum" right-hand menu on forums page.
More discussions in Flash Runtime Announcements
adobe
Comments
Post a Comment