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

Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 

Dernier (20)

Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 

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