SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Introduction to
 Introduction to
Flash Runtime Mobile Features
Flash Runtime Mobile Features          White Master




Flash Runtime Globalization Team
Flash Runtime Globalization Team
Hao Wu, Yi Zhai
                                   1
1. Features of Flash Runtime on Mobile
   Accelerometer

   GPS

   Camera

   Stage Video

   Device Speaker Control

2. Workshop – Native Extension




                             2
3
   The Accelerometer class dispatches events based on activity detected by the
    device's motion sensor. This data represents the device's location or
    movement along a 3-dimensional axis.




                                         4
var accelerometer:Accelerometer;
if(Accelerometer.isSupported){
    accelerometer = new Accelerometer();
    accelerometer.addEventListener(AccelerometerEvent.UPDATE,
                                                          updateHandler);
}
private function updateHandler (e:AccelerometerEvent):void{
    trace(e.accelerationX);
    trace(e.accelerationY);
    trace(e.accelerationZ);
    trace(e.timestamp)
}




                                      5
6
7
   The Geolocation class dispatches events in response to the device's location
    sensor.




                                          8
var geolocation:Geolocation;
if(Geolocation.isSupported){
    geolocation = new Geolocation();
    if(!geolocation.muted){
              geolocation.setRequestedUpdateInterval(10000);
              geolocation.addEventListener(GeolocationEvent.UPDATE,updateHandler);
    }
}
private function updateHandler(e:GeolocationEvent):void{
    trace(e.longitude);
    trace(e.latitude);
    trace(e.altitude); //Other properties: heading, speed, timestamp
}                             //horizaontalAccuracy, VerticalAccuracy,




                                               9
10
11
   CameraUI
        The CameraUI class allows you to capture a still image or video using the
         default camera application on a device.
   CameraRoll
        The CameraRoll class allows you to access image data in the system media
         library or "camera roll."




                                           12
if (CameraUI.isSupported){
    myCam = new CameraUI();
    myCam.addEventListener(MediaEvent.COMPLETE, onComplete);
    myCam.launch(MediaType.IMAGE);
}


if (CameraRoll.supportsBrowseForImage){
    roll = new CameraRoll();
    roll.addEventListener(MediaEvent.SELECT,onMediaSelect);
    roll.browseForImage();
}




                                     13
14
15
16
   The StageVideo object uses the device's hardware acceleration capabilities, if
    available, to display live or recorded video in an application. Hardware
    acceleration capabilities are available on most devices




                                          17
VideoStatus.ACCELERATER   VideoStatus.SOFTWARE

             最佳性能
StageVideo                             使用软件解码,用GPU合成
             使用GPU解码并合成


                                       最差的情况
Video        使用硬件GPU解码,软件合成
                                       使用软件解码并合成




                                 18
private static const FILE_NAME:String = "media/Test_original.mp4";
var sv:StageVideo;
var nc:NetConnection;
var ns:NetStream;
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY,
                                       onStageVideoState);




                                       19
private function onStageVideoState(event:StageVideoAvailabilityEvent):void{


    // Detect if StageVideo is available and decide what to do in toggleStageVideo
    toggleStageVideo(available = inited = (event.availability ==
                                     StageVideoAvailability.AVAILABLE));
}
private function toggleStageVideo(on:Boolean):void{
    sv = stage.stageVideos[0];
    sv.attachNetStream(ns);
    ns.play(FILE_NAME);
}




                                       20
21
22
Ear Piece
                 Speaker Phone




            23
Feature summary
    Enable mobile app to toggle between earpiece and speakerphone
             AIR 2.7                                  > AIR 3.0
No way to choose two speaks         Easily access different speakers
All audio play back through media   Enable the VOIP telephony
speaker
                                    Enumerate all the speakers attached to
                                    device on mobile and desktop

Use cases
    New Adobe Directory/Connect for Android, with VoIP feature
    More AIR-based enterprise apps, integrating Flash Media Gateway



                                      24
AudioPlaybackMode   Speakerphone in       iOS Category be        Audio Output Route
                    use                   used                   (Headphone)
Media               0                     MediaPlayback          Device Speaker
                                                                 (Headphone)
Media               1                     MediaPlayback          Device Speaker
                                                                 (Headphone)




AudioPlaybackMode   Speakerphone in use   iOS Category be used    Audio Output Route
                                                                  (Headphone)
Voice               0                     PlayAndRecord           Phone Receiver
                                                                  (Headphone)
Voice               1                     PlayAndRecord           Device Speaker




                                          25
Play_button.addEventListener(MouseEvent.CLICK, playMusic);
function playMusic(e:Event):void
{
    SoundMixer.audioPlaybackMode = “media”;
    SoundMixer.useSpeakerphoneForVoice = false;
    if(! playing)
    {
             sc = music.play(pos);
             playing = true;
    }
}




                                     26
 Microphone.isSupported
 Microphone.getMicrophone()
 Microphone.getEnhancedMicrophone()
 Microphone.setUseEchoSuppression()
 Microphone.setSilenceLevel(silenceLevel,   timeout)
 SampleDataEvent.SAMPLE_DATA
 Microphone.activityLevel




                                       27
…

   Front-facing camera support
   Android Market licensing integration
   Captive runtime support for Android
   Stagetext
   Flash Access on Android
   Mobile background app audio playback for iOS
   Enable HW Video decoding on various chipsets
   Native Extensions on Mobile




                                      28
NativeExtension




       29
The native extensions feature enables the addition of third-party, native-code
backed ActionScript APIs to AIR applications.




         Normal apps                           NativeExtension apps

           A actionscript Library with Native Code implementation


                                         30
   Enhance Performance
        Zxing:ActionScript 2000ms, Android 10ms
   Expand functions
        Autofocus for camera , Vibration …




                                          31
32
33
34
35
An Android Project

    Provide Native Implementation for Native Extension

A Flex Library Project

    Provide ActionScript API for Native Extension




                                        36
Ane file

    A set of Actionscript with native code implementation

A Flex Mobile Project

    Use the ane




                                       37
38

Más contenido relacionado

La actualidad más candente

android_project
android_projectandroid_project
android_projectAdit Ghosh
 
Ableton Live 8 Manual En
Ableton Live 8 Manual EnAbleton Live 8 Manual En
Ableton Live 8 Manual Enguestcd5313
 
Development Playbook Application With Adobe AIR 2.5 and QNX SDK
Development Playbook Application With Adobe AIR 2.5 and QNX SDKDevelopment Playbook Application With Adobe AIR 2.5 and QNX SDK
Development Playbook Application With Adobe AIR 2.5 and QNX SDKTubagus Anwar
 
Autonomous Drone Development with Java and IoT
Autonomous Drone Development with Java and IoTAutonomous Drone Development with Java and IoT
Autonomous Drone Development with Java and IoTjavafxpert
 
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger,  GreenrobotDroidcon 2011: Gingerbread and honeycomb, Markus Junginger,  Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, GreenrobotDroidcon Berlin
 
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...BeMyApp
 
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TVBeMyApp
 
I/O 2011 報告会 ADKで遊んでみた
I/O 2011 報告会 ADKで遊んでみたI/O 2011 報告会 ADKで遊んでみた
I/O 2011 報告会 ADKで遊んでみたMakoto Yamazaki
 

La actualidad más candente (9)

android_project
android_projectandroid_project
android_project
 
Ableton Live 8 Manual En
Ableton Live 8 Manual EnAbleton Live 8 Manual En
Ableton Live 8 Manual En
 
Development Playbook Application With Adobe AIR 2.5 and QNX SDK
Development Playbook Application With Adobe AIR 2.5 and QNX SDKDevelopment Playbook Application With Adobe AIR 2.5 and QNX SDK
Development Playbook Application With Adobe AIR 2.5 and QNX SDK
 
Autonomous Drone Development with Java and IoT
Autonomous Drone Development with Java and IoTAutonomous Drone Development with Java and IoT
Autonomous Drone Development with Java and IoT
 
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger,  GreenrobotDroidcon 2011: Gingerbread and honeycomb, Markus Junginger,  Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
 
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
 
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
 
Usability lab design proposal
Usability lab design proposal Usability lab design proposal
Usability lab design proposal
 
I/O 2011 報告会 ADKで遊んでみた
I/O 2011 報告会 ADKで遊んでみたI/O 2011 報告会 ADKで遊んでみた
I/O 2011 報告会 ADKで遊んでみた
 

Similar a Flash runtime on mobile

Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screenspaultrani
 
Flash for Mobile Devices
Flash for Mobile DevicesFlash for Mobile Devices
Flash for Mobile Devicespaultrani
 
AIR2.5 Hands On - Flash on the Beach 2010
AIR2.5 Hands On - Flash on the Beach 2010AIR2.5 Hands On - Flash on the Beach 2010
AIR2.5 Hands On - Flash on the Beach 2010Mark Doherty
 
Flash and Hardware
Flash and HardwareFlash and Hardware
Flash and HardwareKevin Hoyt
 
Synapseindia android application development tutorial
Synapseindia android application development tutorialSynapseindia android application development tutorial
Synapseindia android application development tutorialSynapseindiappsdevelopment
 
Synapseindia android apps development tutorial
Synapseindia android apps  development tutorialSynapseindia android apps  development tutorial
Synapseindia android apps development tutorialSynapseindiappsdevelopment
 
Adobe AIR 2.5 Beta for Android
Adobe AIR 2.5 Beta for AndroidAdobe AIR 2.5 Beta for Android
Adobe AIR 2.5 Beta for AndroidMark Doherty
 
Android Open Accessory APIs
Android Open Accessory APIsAndroid Open Accessory APIs
Android Open Accessory APIsPearl Chen
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDXJussi Pohjolainen
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDXJussi Pohjolainen
 
Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Jeff Sipko
 
What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018Somkiat Khitwongwattana
 
Human Interaction Library
Human Interaction LibraryHuman Interaction Library
Human Interaction Librarygraphitech
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment pptsagaroceanic11
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment pptsagaroceanic11
 
Silverlight in Internet Scenarios
Silverlight in Internet ScenariosSilverlight in Internet Scenarios
Silverlight in Internet ScenariosRicardo Fiel
 

Similar a Flash runtime on mobile (20)

Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screens
 
Flash for Mobile Devices
Flash for Mobile DevicesFlash for Mobile Devices
Flash for Mobile Devices
 
AIR2.5 Hands On - Flash on the Beach 2010
AIR2.5 Hands On - Flash on the Beach 2010AIR2.5 Hands On - Flash on the Beach 2010
AIR2.5 Hands On - Flash on the Beach 2010
 
Flash and Hardware
Flash and HardwareFlash and Hardware
Flash and Hardware
 
Synapseindia android application development tutorial
Synapseindia android application development tutorialSynapseindia android application development tutorial
Synapseindia android application development tutorial
 
Synapseindia android apps development tutorial
Synapseindia android apps  development tutorialSynapseindia android apps  development tutorial
Synapseindia android apps development tutorial
 
Adobe AIR 2.5 Beta for Android
Adobe AIR 2.5 Beta for AndroidAdobe AIR 2.5 Beta for Android
Adobe AIR 2.5 Beta for Android
 
Android Open Accessory APIs
Android Open Accessory APIsAndroid Open Accessory APIs
Android Open Accessory APIs
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Andriod Pentesting and Malware Analysis
Andriod Pentesting and Malware AnalysisAndriod Pentesting and Malware Analysis
Andriod Pentesting and Malware Analysis
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Integrando sua app Android com Chromecast
Integrando sua app Android com ChromecastIntegrando sua app Android com Chromecast
Integrando sua app Android com Chromecast
 
Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2
 
What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018
 
Human Interaction Library
Human Interaction LibraryHuman Interaction Library
Human Interaction Library
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment ppt
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment ppt
 
Java-Events
Java-EventsJava-Events
Java-Events
 
Silverlight in Internet Scenarios
Silverlight in Internet ScenariosSilverlight in Internet Scenarios
Silverlight in Internet Scenarios
 

Último

Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 

Último (20)

Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 

Flash runtime on mobile

  • 1. Introduction to Introduction to Flash Runtime Mobile Features Flash Runtime Mobile Features White Master Flash Runtime Globalization Team Flash Runtime Globalization Team Hao Wu, Yi Zhai 1
  • 2. 1. Features of Flash Runtime on Mobile  Accelerometer  GPS  Camera  Stage Video  Device Speaker Control 2. Workshop – Native Extension 2
  • 3. 3
  • 4. The Accelerometer class dispatches events based on activity detected by the device's motion sensor. This data represents the device's location or movement along a 3-dimensional axis. 4
  • 5. var accelerometer:Accelerometer; if(Accelerometer.isSupported){ accelerometer = new Accelerometer(); accelerometer.addEventListener(AccelerometerEvent.UPDATE, updateHandler); } private function updateHandler (e:AccelerometerEvent):void{ trace(e.accelerationX); trace(e.accelerationY); trace(e.accelerationZ); trace(e.timestamp) } 5
  • 6. 6
  • 7. 7
  • 8. The Geolocation class dispatches events in response to the device's location sensor. 8
  • 9. var geolocation:Geolocation; if(Geolocation.isSupported){ geolocation = new Geolocation(); if(!geolocation.muted){ geolocation.setRequestedUpdateInterval(10000); geolocation.addEventListener(GeolocationEvent.UPDATE,updateHandler); } } private function updateHandler(e:GeolocationEvent):void{ trace(e.longitude); trace(e.latitude); trace(e.altitude); //Other properties: heading, speed, timestamp } //horizaontalAccuracy, VerticalAccuracy, 9
  • 10. 10
  • 11. 11
  • 12. CameraUI  The CameraUI class allows you to capture a still image or video using the default camera application on a device.  CameraRoll  The CameraRoll class allows you to access image data in the system media library or "camera roll." 12
  • 13. if (CameraUI.isSupported){ myCam = new CameraUI(); myCam.addEventListener(MediaEvent.COMPLETE, onComplete); myCam.launch(MediaType.IMAGE); } if (CameraRoll.supportsBrowseForImage){ roll = new CameraRoll(); roll.addEventListener(MediaEvent.SELECT,onMediaSelect); roll.browseForImage(); } 13
  • 14. 14
  • 15. 15
  • 16. 16
  • 17. The StageVideo object uses the device's hardware acceleration capabilities, if available, to display live or recorded video in an application. Hardware acceleration capabilities are available on most devices 17
  • 18. VideoStatus.ACCELERATER VideoStatus.SOFTWARE 最佳性能 StageVideo 使用软件解码,用GPU合成 使用GPU解码并合成 最差的情况 Video 使用硬件GPU解码,软件合成 使用软件解码并合成 18
  • 19. private static const FILE_NAME:String = "media/Test_original.mp4"; var sv:StageVideo; var nc:NetConnection; var ns:NetStream; nc = new NetConnection(); nc.connect(null); ns = new NetStream(nc); stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, onStageVideoState); 19
  • 20. private function onStageVideoState(event:StageVideoAvailabilityEvent):void{ // Detect if StageVideo is available and decide what to do in toggleStageVideo toggleStageVideo(available = inited = (event.availability == StageVideoAvailability.AVAILABLE)); } private function toggleStageVideo(on:Boolean):void{ sv = stage.stageVideos[0]; sv.attachNetStream(ns); ns.play(FILE_NAME); } 20
  • 21. 21
  • 22. 22
  • 23. Ear Piece Speaker Phone 23
  • 24. Feature summary  Enable mobile app to toggle between earpiece and speakerphone AIR 2.7 > AIR 3.0 No way to choose two speaks Easily access different speakers All audio play back through media Enable the VOIP telephony speaker Enumerate all the speakers attached to device on mobile and desktop Use cases  New Adobe Directory/Connect for Android, with VoIP feature  More AIR-based enterprise apps, integrating Flash Media Gateway 24
  • 25. AudioPlaybackMode Speakerphone in iOS Category be Audio Output Route use used (Headphone) Media 0 MediaPlayback Device Speaker (Headphone) Media 1 MediaPlayback Device Speaker (Headphone) AudioPlaybackMode Speakerphone in use iOS Category be used Audio Output Route (Headphone) Voice 0 PlayAndRecord Phone Receiver (Headphone) Voice 1 PlayAndRecord Device Speaker 25
  • 26. Play_button.addEventListener(MouseEvent.CLICK, playMusic); function playMusic(e:Event):void { SoundMixer.audioPlaybackMode = “media”; SoundMixer.useSpeakerphoneForVoice = false; if(! playing) { sc = music.play(pos); playing = true; } } 26
  • 27.  Microphone.isSupported  Microphone.getMicrophone()  Microphone.getEnhancedMicrophone()  Microphone.setUseEchoSuppression()  Microphone.setSilenceLevel(silenceLevel, timeout)  SampleDataEvent.SAMPLE_DATA  Microphone.activityLevel 27
  • 28. …  Front-facing camera support  Android Market licensing integration  Captive runtime support for Android  Stagetext  Flash Access on Android  Mobile background app audio playback for iOS  Enable HW Video decoding on various chipsets  Native Extensions on Mobile 28
  • 30. The native extensions feature enables the addition of third-party, native-code backed ActionScript APIs to AIR applications. Normal apps NativeExtension apps A actionscript Library with Native Code implementation 30
  • 31. Enhance Performance  Zxing:ActionScript 2000ms, Android 10ms  Expand functions  Autofocus for camera , Vibration … 31
  • 32. 32
  • 33. 33
  • 34. 34
  • 35. 35
  • 36. An Android Project Provide Native Implementation for Native Extension A Flex Library Project Provide ActionScript API for Native Extension 36
  • 37. Ane file A set of Actionscript with native code implementation A Flex Mobile Project Use the ane 37
  • 38. 38