SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
A new application paradigm: Using the 2nd
screen API with Miracast
• Who we are: short recap of LG's Android highlights

• What is Miracast and how can I use it?

• Android API Level 17: The 2nd Screen API hands-on

• Usage Scenarios – what can I do with it?
LIFE’S GOOD
WHEN YOU MAKE
THE MOST OF IT!
NEXUS 4

Nexus 4 is the new smartphone from Google.

Developed by LG.

With cutting edge hardware, your favorite Google Apps,
and the latest version of Android, Nexus 4
puts the best of Google in the palm of your hand.
LG TECHNOLOGY LEADERSHIP




     True HD IPSPlus display                                                           Superior mobile
and cutting-edge Zerogap Touch                                                           experience
                                                                                   in speed, performance,
                                   Thinner camera &      Innovation in energy    battery usage and graphics
                                 advanced touch screen    density & efficiency
Wi-Fi Miracast
What is Miracast?

• Wireless Replacement for HDMI
• Based on existing standards
• Using existing device capabilities
• Open for the industry
• Compliance-tested by Wi-Fi Alliance
Miracast Concept

SOURCE                                         SINK


  Display frames
                                 
                               Audio samples       Render
                                                               Synchronized
                                                                                Render


  Video encode                 Audio encode     Video decode                  Audio decode

    Packetize                    Packetize       Depacketize                  Depacketize

     Link content encryption (Optional)             Link content decrypt (Optional)

                    AV mux                                      AV Demux

                   Transport                                    Transport

                     LLC                                           LLC

           Wi-Fi MAC (direct link)                      Wi-Fi MAC (direct link)

                   Wi-Fi PHY                                    Wi-Fi PHY
Miracast Logical Block diagram

Game content

 UI content
                                Composited         Display
                Composition                                                 LCD
                              display surface     controller
Video content



                                 Display
                                 capture




                                                Encoded video
                                 Encode
                                                  bit-stream



                                                 MPEG-2 TS
                  MPEG-2                                           RTP
 PCM audio                                       Audio/Video                Wi-Fi
                 packeting                                      Transport
                                                    mux
Sounds Great! Can I Use It Now?

           Yes! It is commercially available!




Miracast Source             Miracast Display
(e.g. Nexus4, LG Optimus G) (e.g. LG BlueRay Player,
                            HomeCinema, SmartTV,
                            Monitor)
Android 4.2
Secondary Displays
What's the secondary display API?

From 4.2 (API Level 17), Android supports output to multiple displays in
a hardware-agnostic way, which means:

You can implement support for multiple displays in your applications
without having to worry about the way those displays are connected!

You can control the output on this displays independently of the phones
screen!
Presentation Class


                   associated with   android.view.Display




Before showing a Presentation it's important to choose
the Display on which it will appear. There are two main
ways to choose a Display:

1. Using the MediaRouter – System will decide
2. Using the DisplayManager – Enumeration of Displays
Code Example - How to get a display

protected Display getDisplay() {

     if(mUseMediaRouter){
         //Use the MediaRouter that supports live video
         MediaRouter.RouteInfo route =
           mMediaRouter.getSelectedRoute(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);

          mCurrentDisplay = route.getPresentationDisplay();
     }
     else {
       // Get all available displays using the DisplayManager

         Display[] displays =
           mDisplayManager.getDisplays(
             DisplayManager.DISPLAY_CATEGORY_PRESENTATION);

          // Keep an object to the first available external display
          mCurrentDisplay = displays[0];
     }

     return mCurrentDisplay;
}
Getting the displays metrics


You can obtain the metrics with getMetrics() of the external Display in
order to use the proper resources for the external display


Keep in mind that screens
connected to the users device
often have a larger screen size
and likely a different screen
density. Because the screen
characteristics may differ, you
should provide resources that are
optimized specifically for such
larger displays.
Simple Example: Presentation

public class TextDemoPresentation extends Presentation {
   private TextView mText;

    public TextDemoPresentation(Context context, Display
       display) {
           super(context, display);
        }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Inflate the layout.
        setContentView(
           R.layout.presentation_text);       Hello droidcon!
        // Find the TextView field
        mText = (TextView)
          findViewById(R.id.demoText);
    }
}
Lifecycle

A presentation is canceled when the display to which it is attached is
removed.

An activity should take care of pausing and resuming whatever content
is playing within the presentation whenever the activity itself is paused
or resumed.

If you use OpenGL in the Presentation the OpenGL context will get lost
on pausing. The only way to keep the context during pause/resume is
to call onPause() and onResume() manually on the GLSurfaceView in
the pause and resume callbacks of your activity.

public void onPause() {
    mGLSurfaceView.onPause();
}

public void onResume() {
    mGLSurfaceView.onResume();
}
Developer Options

Android provides an easy on-device method to test your app using the
secondary display API in the developer option. You can select several
resolutions and once activated you get an overlay emulating the
secondary screen(s)
Secondary Displays

A new application
paradigm
Use cases - Ideas



 Add external Display support to your existing
 app in order to utilize other (bigger) displays
 when available, e.g. a browser could render
 content with the external displays resolution
Use cases - Ideas



 Add a special mode to your existing application
 to show the content on the external display
 when available and provide special input mode
 on the phone, e.g. just browser input fields and
 moving controls
Use cases - Ideas



 Dedicated apps which work ONLY with external
 displays, e.g. a Home Office App to utilize your
 phone as PC replacement together with mouse
 and keyboard
Summary

Miracast is
• a method to transmit audio/video from a mobile
  device to external display(s)
• OPEN, STANDARDIZED and COMMERCIALLY
  AVAILABLE

Secondary Display API is
• introduced with Android API Level 17
• adds methods to control the content on multiple
  displays

   Exciting new use cases for applications!!!
http://developer.lge.com



Thank you.
Don’t miss the
demo at our         www.lgworld.com

booth!

Weitere ähnliche Inhalte

Was ist angesagt?

Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
Dennise Layague
 

Was ist angesagt? (20)

Versions of android
Versions of androidVersions of android
Versions of android
 
What's new in Android Pie
What's new in Android PieWhat's new in Android Pie
What's new in Android Pie
 
Android and android versions
Android and android versionsAndroid and android versions
Android and android versions
 
Android OS version history
Android OS version historyAndroid OS version history
Android OS version history
 
History of android os from 1.0 to 9.0 pie
History of android os   from 1.0 to 9.0 pieHistory of android os   from 1.0 to 9.0 pie
History of android os from 1.0 to 9.0 pie
 
Android Versions
Android VersionsAndroid Versions
Android Versions
 
Versions of android
Versions of androidVersions of android
Versions of android
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portland
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
 
Versions of Android OS
Versions of Android OSVersions of Android OS
Versions of Android OS
 
Enlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TVEnlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TV
 
Android Operating System
Android Operating System Android Operating System
Android Operating System
 
Android By Vipin
Android By VipinAndroid By Vipin
Android By Vipin
 
Android introduction
Android introductionAndroid introduction
Android introduction
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android PPT
Android PPTAndroid PPT
Android PPT
 
Android Apps Development Basic
Android Apps Development BasicAndroid Apps Development Basic
Android Apps Development Basic
 
The unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in AndroidThe unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in Android
 
Presentation on android
Presentation on androidPresentation on android
Presentation on android
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 

Ähnlich wie Droidcon2013 miracast final2

20110917 saitama iphone_dev
20110917 saitama iphone_dev20110917 saitama iphone_dev
20110917 saitama iphone_dev
Kaoru NAKAMURA
 
Skype testing overview
Skype testing overviewSkype testing overview
Skype testing overview
QA Club Kiev
 
Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья Лёвин
GDG Saint Petersburg
 
20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt
Videoguy
 
Brokerage 2007 presentation multimedia
Brokerage 2007 presentation multimediaBrokerage 2007 presentation multimedia
Brokerage 2007 presentation multimedia
imec.archive
 

Ähnlich wie Droidcon2013 miracast final2 (20)

Sandeep_Resume
Sandeep_ResumeSandeep_Resume
Sandeep_Resume
 
20110917 saitama iphone_dev
20110917 saitama iphone_dev20110917 saitama iphone_dev
20110917 saitama iphone_dev
 
HTC Developer - 2012
HTC Developer - 2012HTC Developer - 2012
HTC Developer - 2012
 
Going Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTCGoing Mobile with React Native and WebRTC
Going Mobile with React Native and WebRTC
 
Streaming Multimedia content distribution system using mobile application by...
Streaming  Multimedia content distribution system using mobile application by...Streaming  Multimedia content distribution system using mobile application by...
Streaming Multimedia content distribution system using mobile application by...
 
Skype testing overview
Skype testing overviewSkype testing overview
Skype testing overview
 
Skype testing overview
Skype testing overviewSkype testing overview
Skype testing overview
 
DCC Labs Company Presentation
DCC Labs Company PresentationDCC Labs Company Presentation
DCC Labs Company Presentation
 
Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья Лёвин
 
Streaming Tech Sweden 2019 - Serverless Media Processing
Streaming Tech Sweden 2019 - Serverless Media ProcessingStreaming Tech Sweden 2019 - Serverless Media Processing
Streaming Tech Sweden 2019 - Serverless Media Processing
 
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
 
Pv Android Slides For Posting
Pv Android Slides For PostingPv Android Slides For Posting
Pv Android Slides For Posting
 
P9000 p-017o (argon general presentation - june 2014)
P9000 p-017o (argon general presentation - june 2014)P9000 p-017o (argon general presentation - june 2014)
P9000 p-017o (argon general presentation - june 2014)
 
An Introduction to castLabs
An Introduction to castLabs An Introduction to castLabs
An Introduction to castLabs
 
Enhancing and Operating Video Collaboration with your Network
Enhancing and Operating Video Collaboration with your NetworkEnhancing and Operating Video Collaboration with your Network
Enhancing and Operating Video Collaboration with your Network
 
The MPEG Extensible Middleware API
The MPEG Extensible Middleware APIThe MPEG Extensible Middleware API
The MPEG Extensible Middleware API
 
20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt
 
Brokerage 2007 presentation multimedia
Brokerage 2007 presentation multimediaBrokerage 2007 presentation multimedia
Brokerage 2007 presentation multimedia
 
Adobe Session on Flash Online Conference #12
Adobe Session on Flash Online Conference #12Adobe Session on Flash Online Conference #12
Adobe Session on Flash Online Conference #12
 
Mini Project- Digital Video Editing
Mini Project- Digital Video EditingMini Project- Digital Video Editing
Mini Project- Digital Video Editing
 

Mehr von Droidcon Berlin

Droidcon de 2014 google cast
Droidcon de 2014   google castDroidcon de 2014   google cast
Droidcon de 2014 google cast
Droidcon Berlin
 
Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limits
Droidcon Berlin
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility
Droidcon Berlin
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_back
Droidcon Berlin
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
Droidcon Berlin
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
Droidcon Berlin
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
Droidcon Berlin
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3
Droidcon Berlin
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkrauss
Droidcon Berlin
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014
Droidcon Berlin
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014
Droidcon Berlin
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidcon
Droidcon Berlin
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
Droidcon Berlin
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
Droidcon Berlin
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicro
Droidcon Berlin
 

Mehr von Droidcon Berlin (20)

Droidcon de 2014 google cast
Droidcon de 2014   google castDroidcon de 2014   google cast
Droidcon de 2014 google cast
 
Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limits
 
crashing in style
crashing in stylecrashing in style
crashing in style
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility
 
Details matter in ux
Details matter in uxDetails matter in ux
Details matter in ux
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_back
 
droidparts
droidpartsdroidparts
droidparts
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
 
5 tips of monetization
5 tips of monetization5 tips of monetization
5 tips of monetization
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkrauss
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidcon
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicro
 

Kürzlich hochgeladen

Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
ZurliaSoop
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 

Kürzlich hochgeladen (20)

Buy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail AccountsBuy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail Accounts
 
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableBerhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Pre Engineered Building Manufacturers Hyderabad.pptx
Pre Engineered  Building Manufacturers Hyderabad.pptxPre Engineered  Building Manufacturers Hyderabad.pptx
Pre Engineered Building Manufacturers Hyderabad.pptx
 
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
 
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 
WheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond InsightsWheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond Insights
 
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptxQSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
 
HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024
 
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 

Droidcon2013 miracast final2

  • 1.
  • 2. A new application paradigm: Using the 2nd screen API with Miracast • Who we are: short recap of LG's Android highlights • What is Miracast and how can I use it? • Android API Level 17: The 2nd Screen API hands-on • Usage Scenarios – what can I do with it?
  • 3. LIFE’S GOOD WHEN YOU MAKE THE MOST OF IT!
  • 4. NEXUS 4 Nexus 4 is the new smartphone from Google. Developed by LG. With cutting edge hardware, your favorite Google Apps, and the latest version of Android, Nexus 4 puts the best of Google in the palm of your hand.
  • 5.
  • 6. LG TECHNOLOGY LEADERSHIP True HD IPSPlus display Superior mobile and cutting-edge Zerogap Touch experience in speed, performance, Thinner camera & Innovation in energy battery usage and graphics advanced touch screen density & efficiency
  • 8. What is Miracast? • Wireless Replacement for HDMI • Based on existing standards • Using existing device capabilities • Open for the industry • Compliance-tested by Wi-Fi Alliance
  • 9. Miracast Concept SOURCE SINK Display frames  Audio samples Render Synchronized Render Video encode Audio encode Video decode Audio decode Packetize Packetize Depacketize Depacketize Link content encryption (Optional) Link content decrypt (Optional) AV mux AV Demux Transport Transport LLC LLC Wi-Fi MAC (direct link) Wi-Fi MAC (direct link) Wi-Fi PHY Wi-Fi PHY
  • 10. Miracast Logical Block diagram Game content UI content Composited Display Composition LCD display surface controller Video content Display capture Encoded video Encode bit-stream MPEG-2 TS MPEG-2 RTP PCM audio Audio/Video Wi-Fi packeting Transport mux
  • 11. Sounds Great! Can I Use It Now? Yes! It is commercially available! Miracast Source Miracast Display (e.g. Nexus4, LG Optimus G) (e.g. LG BlueRay Player, HomeCinema, SmartTV, Monitor)
  • 13. What's the secondary display API? From 4.2 (API Level 17), Android supports output to multiple displays in a hardware-agnostic way, which means: You can implement support for multiple displays in your applications without having to worry about the way those displays are connected! You can control the output on this displays independently of the phones screen!
  • 14. Presentation Class associated with android.view.Display Before showing a Presentation it's important to choose the Display on which it will appear. There are two main ways to choose a Display: 1. Using the MediaRouter – System will decide 2. Using the DisplayManager – Enumeration of Displays
  • 15. Code Example - How to get a display protected Display getDisplay() { if(mUseMediaRouter){ //Use the MediaRouter that supports live video MediaRouter.RouteInfo route = mMediaRouter.getSelectedRoute(MediaRouter.ROUTE_TYPE_LIVE_VIDEO); mCurrentDisplay = route.getPresentationDisplay(); } else { // Get all available displays using the DisplayManager Display[] displays = mDisplayManager.getDisplays( DisplayManager.DISPLAY_CATEGORY_PRESENTATION); // Keep an object to the first available external display mCurrentDisplay = displays[0]; } return mCurrentDisplay; }
  • 16. Getting the displays metrics You can obtain the metrics with getMetrics() of the external Display in order to use the proper resources for the external display Keep in mind that screens connected to the users device often have a larger screen size and likely a different screen density. Because the screen characteristics may differ, you should provide resources that are optimized specifically for such larger displays.
  • 17. Simple Example: Presentation public class TextDemoPresentation extends Presentation { private TextView mText; public TextDemoPresentation(Context context, Display display) { super(context, display); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Inflate the layout. setContentView( R.layout.presentation_text); Hello droidcon! // Find the TextView field mText = (TextView) findViewById(R.id.demoText); } }
  • 18. Lifecycle A presentation is canceled when the display to which it is attached is removed. An activity should take care of pausing and resuming whatever content is playing within the presentation whenever the activity itself is paused or resumed. If you use OpenGL in the Presentation the OpenGL context will get lost on pausing. The only way to keep the context during pause/resume is to call onPause() and onResume() manually on the GLSurfaceView in the pause and resume callbacks of your activity. public void onPause() { mGLSurfaceView.onPause(); } public void onResume() { mGLSurfaceView.onResume(); }
  • 19. Developer Options Android provides an easy on-device method to test your app using the secondary display API in the developer option. You can select several resolutions and once activated you get an overlay emulating the secondary screen(s)
  • 20. Secondary Displays A new application paradigm
  • 21. Use cases - Ideas Add external Display support to your existing app in order to utilize other (bigger) displays when available, e.g. a browser could render content with the external displays resolution
  • 22. Use cases - Ideas Add a special mode to your existing application to show the content on the external display when available and provide special input mode on the phone, e.g. just browser input fields and moving controls
  • 23. Use cases - Ideas Dedicated apps which work ONLY with external displays, e.g. a Home Office App to utilize your phone as PC replacement together with mouse and keyboard
  • 24. Summary Miracast is • a method to transmit audio/video from a mobile device to external display(s) • OPEN, STANDARDIZED and COMMERCIALLY AVAILABLE Secondary Display API is • introduced with Android API Level 17 • adds methods to control the content on multiple displays Exciting new use cases for applications!!!
  • 25. http://developer.lge.com Thank you. Don’t miss the demo at our www.lgworld.com booth!