A new application paradigm: Using the 2ndscreen API with Miracast• Who we are: short recap of LGs Android highlights• What...
LIFE’S GOODWHEN YOU MAKETHE MOST OF IT!
NEXUS 4Nexus 4 is the new smartphone from Google.Developed by LG.With cutting edge hardware, your favorite Google Apps,and...
LG TECHNOLOGY LEADERSHIP     True HD IPSPlus display                                                           Superior mo...
Wi-Fi Miracast
What is Miracast?• Wireless Replacement for HDMI• Based on existing standards• Using existing device capabilities• Open fo...
Miracast ConceptSOURCE                                         SINK  Display frames                                      ...
Miracast Logical Block diagramGame content UI content                                Composited         Display           ...
Sounds Great! Can I Use It Now?           Yes! It is commercially available!Miracast Source             Miracast Display(e...
Android 4.2Secondary Displays
Whats the secondary display API?From 4.2 (API Level 17), Android supports output to multiple displays ina hardware-agnosti...
Presentation Class                   associated with   android.view.DisplayBefore showing a Presentation its important to ...
Code Example - How to get a displayprotected Display getDisplay() {     if(mUseMediaRouter){         //Use the MediaRouter...
Getting the displays metricsYou can obtain the metrics with getMetrics() of the external Display inorder to use the proper...
Simple Example: Presentationpublic class TextDemoPresentation extends Presentation {   private TextView mText;    public T...
LifecycleA presentation is canceled when the display to which it is attached isremoved.An activity should take care of pau...
Developer OptionsAndroid provides an easy on-device method to test your app using thesecondary display API in the develope...
Secondary DisplaysA new applicationparadigm
Use cases - Ideas Add external Display support to your existing app in order to utilize other (bigger) displays when avail...
Use cases - Ideas Add a special mode to your existing application to show the content on the external display when availab...
Use cases - Ideas Dedicated apps which work ONLY with external displays, e.g. a Home Office App to utilize your phone as P...
SummaryMiracast is• a method to transmit audio/video from a mobile  device to external display(s)• OPEN, STANDARDIZED and ...
http://developer.lge.comThank you.Don’t miss thedemo at our         www.lgworld.combooth!
Droidcon2013 miracast final2
Droidcon2013 miracast final2
Nächste SlideShare
Wird geladen in …5
×

Droidcon2013 miracast final2

5.417 Aufrufe

Veröffentlicht am

Veröffentlicht in: Business, Technologie
  • Als Erste(r) kommentieren

Droidcon2013 miracast final2

  1. 1. A new application paradigm: Using the 2ndscreen API with Miracast• Who we are: short recap of LGs 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?
  2. 2. LIFE’S GOODWHEN YOU MAKETHE MOST OF IT!
  3. 3. NEXUS 4Nexus 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 4puts the best of Google in the palm of your hand.
  4. 4. LG TECHNOLOGY LEADERSHIP True HD IPSPlus display Superior mobileand cutting-edge Zerogap Touch experience in speed, performance, Thinner camera & Innovation in energy battery usage and graphics advanced touch screen density & efficiency
  5. 5. Wi-Fi Miracast
  6. 6. 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
  7. 7. Miracast ConceptSOURCE 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
  8. 8. Miracast Logical Block diagramGame content UI content Composited Display Composition LCD display surface controllerVideo content Display capture Encoded video Encode bit-stream MPEG-2 TS MPEG-2 RTP PCM audio Audio/Video Wi-Fi packeting Transport mux
  9. 9. 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)
  10. 10. Android 4.2Secondary Displays
  11. 11. Whats the secondary display API?From 4.2 (API Level 17), Android supports output to multiple displays ina hardware-agnostic way, which means:You can implement support for multiple displays in your applicationswithout having to worry about the way those displays are connected!You can control the output on this displays independently of the phonesscreen!
  12. 12. Presentation Class associated with android.view.DisplayBefore showing a Presentation its important to choosethe Display on which it will appear. There are two mainways to choose a Display:1. Using the MediaRouter – System will decide2. Using the DisplayManager – Enumeration of Displays
  13. 13. Code Example - How to get a displayprotected 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;}
  14. 14. Getting the displays metricsYou can obtain the metrics with getMetrics() of the external Display inorder to use the proper resources for the external displayKeep in mind that screensconnected to the users deviceoften have a larger screen sizeand likely a different screendensity. Because the screencharacteristics may differ, youshould provide resources that areoptimized specifically for suchlarger displays.
  15. 15. Simple Example: Presentationpublic 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); }}
  16. 16. LifecycleA presentation is canceled when the display to which it is attached isremoved.An activity should take care of pausing and resuming whatever contentis playing within the presentation whenever the activity itself is pausedor resumed.If you use OpenGL in the Presentation the OpenGL context will get loston pausing. The only way to keep the context during pause/resume isto call onPause() and onResume() manually on the GLSurfaceView inthe pause and resume callbacks of your activity.public void onPause() { mGLSurfaceView.onPause();}public void onResume() { mGLSurfaceView.onResume();}
  17. 17. Developer OptionsAndroid provides an easy on-device method to test your app using thesecondary display API in the developer option. You can select severalresolutions and once activated you get an overlay emulating thesecondary screen(s)
  18. 18. Secondary DisplaysA new applicationparadigm
  19. 19. 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
  20. 20. 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
  21. 21. 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
  22. 22. SummaryMiracast is• a method to transmit audio/video from a mobile device to external display(s)• OPEN, STANDARDIZED and COMMERCIALLY AVAILABLESecondary Display API is• introduced with Android API Level 17• adds methods to control the content on multiple displays Exciting new use cases for applications!!!
  23. 23. http://developer.lge.comThank you.Don’t miss thedemo at our www.lgworld.combooth!

×