SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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で遊んでみた
 

Similaire à 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
 

Similaire à 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
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Dernier (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

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