25
Intel Confidential — Do Not Forward Using the Second-Screen API and Intel ® Wireless Display From Android* apps. Xavier Hallade, Technical Marketing Engineer

Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Embed Size (px)

Citation preview

Page 1: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Intel Confidential — Do Not Forward

Using the Second-Screen API and Intel® Wireless

Display From Android* apps.Xavier Hallade, Technical Marketing Engineer

Page 2: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

What is Miracast*?Miracast* is standard for wireless peer-to-peer screen-casting, created and certified by the WiFi Alliance*

Wireless replacement for HDMI*/MHL*

Built upon existing standards

H.264 (MPEG-4 AVC) video compression & WiFi Direct

Based on Intel® Wi-Fi Display specifications

Open for the industry

Support added in Android* 4.2

It is NOT DLNA or ChromeCast

Page 3: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

What is Intel® Wireless Display (WiDi)

Supports two additional Display modes

Extended Video mode (with Android* media framework)

Multi-task usage support (content on second screen, while local screen used for other task)

Available on most Intel® Atom™ SOCs

Intel® WiDi is a superset of WFA Miracast*

• WFA Miracast* certified– compatible with Miracast* certified receivers.

• Supports HD video up to 1080p/60 with 5.1 audio• Content protection with HDCP2.1

Page 4: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Miracast* Concept

Video Render Audio Render

Video Decode Audio Decode

De-Packetize De-Packetize

Link Content Protection Decrypt

(Optional)

AV DeMux

Transport

LLC

WI-Fi MAC (Direct Link)

Wi-Fi PHY

SINK

Video Encode Audio Encode

Packetize Packetize

Link Content Protection Encrypt

(Optional)

AV Mux

Transport

LLC

WI-Fi MAC (Direct Link)

Wi-Fi PHY

Video Frames Audio Samples

SOURCE

Page 5: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Adapters

• Actiontec* ScreenBeam Pro

• Netgear* (ex: PTV3000)

• Viewsonic (WPG-370)

• Acer*

• Best Buy* Rocketfish*

• Lenovo*

• …

Projectors

• Dell*

• Seiko Epson *

• Ricoh*

• LG*

• …

TVs

• Samsung*

• Toshiba*

• LG*

• TCL*

• Sharp*

• Philips*

• …

Miracast* Certified Sink Devices

Full list of Miracast* certified devices can be found at

http://www.wi-fi.org/wi-fi-certified-miracast

Intel® WiDi Certified

Page 6: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Miracast vs Intel® WiDi Receiver Spec

Features Miracast Intel® WiDi (4th Gen)

Resolution 480p/30fps720p Optional

1080p/30fps1080p/60fps Optional

HDCP Optional 2.1

Audio Stereo Sound Stereo Sound & 5.1 Surround

Sound

S3D Optional Yes

Speed Mode Optional Low Latency

Fast Cursor No Yes

Page 7: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Second-Screen Enabled Devices running Android*

4.2.x

Device Miracast*

Certified

HDMI*, MHL* or

SlimPort*

Samsung* Galaxy S4 Yes Yes

Samsung Galaxy Tab3 10.1 No Yes

Sony* Xperia Z Yes Yes

LG* Optimus G Yes Yes

Nexus* 4, 5 Yes Yes

HTC* One Yes Yes

Lenovo* K900 Yes No

Asus* MeMO Pad FHD10 Yes Yes

Page 8: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Connecting a Wireless Display on Android*

Sony* Xperia Z Stock/Intel® Samsung* Galaxy S4

Page 9: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Clone Mode (Default)

After establishing the connection, user sees local screen on the remote

display

Resolution sent to remote is the same as local display’s

No need to do anything to support this mode

Page 10: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Dual Screen Display With Single App

Remote screen used for content viewing

Local screen used for control & context info

Application can target this mode using the Android*

Presentation API

Page 11: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Extended Video Mode

(Intel® Platform Specific)

Video mode is activated automatically when user plays a video using Android* Media Player framework (ex: VideoView)

User sees video content on the remote at the 1080p resolution (or whatever

the native resolution of the content is)

Local video rendering is turned off to save power, but UI stays untouched

Page 12: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Intel® WiDi – Dual Screen Possibilities

97 MPH 4 POS 107 MPH 8 POS 111 MPH 14 POS

LIVE FEED

TURN 7

App Window #1

Configure and add select

content

on 2’ screen

App Window #2

View multi-angle

Videos & more on

10’ large screen

Multi-video

User configured

Application

EXTREME

Content

Driver #48- Car Cam

Driver #10 –

Follow the Car

Track Cam

Location

Car Race Main Live Feed

Driver #8- Car Cam Driver #99- Car Cam

Tweet Feeds….

Layout

1

Layout

4

Layout

3

Layout

2MPH / POS MPH / POS MPH //POS

Cl ea r All

Follow

Driver

Driver

Tweets

Driver

Stats

Live

Feed

Driver

Locatio

n

L oa d Layout Sa ve Layout

THE RACE

One application, pulling content from one site, driving two screens!

Page 13: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Ideas for Dual Screen Applications

Enter search term

Touchpad Mode

Web Browser

Page 14: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Ideas for Dual Screen Applications

And

Keyboard Input Mode

wq e r t y u i o p

sa d f g h j k l

z x c v b n m

&123 / space · search

And

Web Browser

Page 15: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Ideas for Dual Screen Applications

Games

Dual Joysticks Mode

Page 16: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Ideas for Dual Screen Applications

Productivity

App

Page 17: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Ideas for Dual Screen Applications

Current matches

X vs. Y

A vs. B

X vs. Z

Add Score

11

Player X vs. Player Z

7

Tournament Manager

Page 18: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Second-Screen

Demo

Page 19: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Android* Secondary Display API

Android added Second-Screen support via the Presentation class in

Android* 4.2 (API Level 17), allowing you to:

• Implement support for a second screen in your applications without having to worry

about the way the displays are connected (Display agnostic)

• Works with MHL*, HDMI*, SlimPort* & Miracast* compatible devices

• You can control the output on the remote (second) screen independently of the phone

screen

Page 20: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

The Presentation Object

Dialog

Presentation

You need to have a fragment based navigation if

you want to keep it running while navigating in

the app.

The activity should take care of pausing and

resuming whatever content is playing within the

presentation whenever the activity itself is

paused or resumed.

• Presentation is the based class and should be extended:

• Presentation inherits from Dialog, and as for a Dialog its lifecycle is bound to an

Activity

public class DemoPresentation extends Presentation {

• Needs to be associated with a Display at creation time

Page 21: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Using the Presentation APIBefore showing a Presentation you need to select a Display, this can be done in

2 ways:

1. MediaRouter API (in API 16): system will decide the best display for you!

2. Display Manager API (in API 17): Enumeration of displays

// Get the MediaRouter service MediaRouter mMediaRouter =

(MediaRouter)getSystemService(Context.MEDIA_ROUTER_SERVICE); // Care only about routes that have full video support.MediaRouter.RouteInfo mRouteInfo =

mMediaRouter.getSelectedRoute(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);Display presentationDisplay = mRouteInfo.getPresentationDisplay();

// Get the DisplayManager service. DisplayManager mDisplayManager =

(DisplayManager)getSystemService(Context.DISPLAY_SERVICE); // enumerate the displaysDisplay[] presentationDisplays =mDisplayManager.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION);

Page 22: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Presentation API

MediaRouter.getSelectedRoute

(ROUTE_TYPE_LIVE_VIDEO)

MediaRouter.routeInfo

getPresentationDisplay()

new Presentation(activityContext, display)

.show()

Then, using MediaRouter.addCallback, you have to monitor:

• onRouteUnselected

• onRouteSelected

• onRoutePresentationDisplayChanged

And inside the activity owning the Presentation:

• onResume

• onPause

How to get a Presentation displayed:

Page 23: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Testing your Second-Screen AppsOptions:

• Real Hardware - supporting second screen functionality

• Simulate secondary screen - new feature in Android* 4.2 (in Developer options).

You can select by resolution and DPI and once activated you get an overlay

emulating the secondary screen.

Page 24: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Adding a MediaRouteButton

In res/menu/default.xml:

<item android:title="Media Route Settings" android:actionProviderClass="android.app.MediaRouteActionProvider"android:showAsAction="always" />

//Sets Media Route Button to second screen modemediaRouteActionProvider.setRouteTypes

(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);

Page 25: Using the Second-Screen API and Intel Wireless Display From Android* apps.lyaug.fr/slides/presentation-intel/Using-WiDi-on-Android.… ·  · 2013-12-20Using the Second-Screen API

Q&A