11/23/2016 - Beta - AIR 24.0.0.177
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
apple tv support (beta only)
air 24 beta introduced tvos support, please see beta release notes here. see appletv download section on adobe labs page.
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.
support android app links
starting air 24, developers can use android app links allows app developers associate application web domain own. android app links feature allows app become default handler website uris specify in app.xml
follow below steps application ready app links:
1. create intent filter uri in app.xml
to enable app handle links, use intent filters in app.xml under manifest declare uri patterns app handles. following example shows intent filter can handle links https://www.example.in , 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 app links must declare android:scheme value of http, https, or both. filter must not declare other schemes. enable link verification app, set android:autoverify attribute true on @ least 1 of web uri intent filters in app manifest. read more intent filter here.
2. publish digital asset links json file on websites provide verification
follow steps mentioned here create assetlinks.json file , publishing same on website.
note: developers can receive url , arguments in actionscript code registering nativeapplication invokeevent(e.g. nativeapplication.nativeapplication.addeventlistener(invokeevent.invoke, invokehandler); ) read more actionscript invokeevent read here.
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.
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.
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 antialiasing
1=2 subsamples, medium antialiasing
2=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
- [ios] apps created using flex in aot mode crashes on ios (4186829)
- [ios] failed find class dtiphonesimulatorsystemroot @ runtime error on trying install app on iphone simulator (4186457).
fixed issues
- starling.display.image mask not rendering on mobile when rendered starling.textures.rendertexture (4196946).
- starling applications getting crashed on ios lower end devices (4186744)
- android - status bar appears when soft keyboard opens , stays indefinitely (4184348)
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