android new feature on 4.2

android new feature on 4.2

 http://web.mit.edu/wwinnie/MacData/afs/sipb/project/android/sdk/android-sdk-linux/docs/about/versions/jelly-bean.html

External display support


Android 4.2 introduces platform support for externaldisplays that goes far beyond mirroring — apps can now targetunique content to any one or multiple displays that are attached to an Androiddevice. Apps can build on this to deliver new kinds of interaction andentertainment experiences to users.

Display manager

Apps interact with displays through a new display manager system service.Your app can enumerate the displays and check the capabilities of each,including size, density, display name, ID, support for secure video, and more.Your app can also receive callbacks when displays are added or removed or whentheir capabilities change, to better manage your content on externaldisplays.

Presentation window

To make it easy to show content on an external display, the frameworkprovides a new UI object called a Presentation — a type of dialog thatrepresents a window for your app’s content on a specific external display. Yourapp just gives the display to use, a theme for the window, and any uniquecontent to show. The Presentation handles inflating resources and rendering yourcontent according to the characteristics of the targeted display.

You can take full control of two or more independent displays using Presentation.

A Presentation gives your app full control over the remote display window andits content and lets you manage it based on user input events such as keypresses, gestures, motion events, and more. You can use all of the normal toolsto create a UI and render content in the Presentation, from building anarbitrary view hierarchy to using SurfaceView or SurfaceTexture to draw directlyinto the window for streamed content or camera previews.

Preferred display selection

When multiple external displays are available, you can create as manyPresentations as you need, with each one showing unique content on a specificdisplay. In many cases, you might only want to show your content on a singleexternal display — but always on the that’s best for Presentation content.For this, the system can help your app choose the best display to use.

To find the best display to use, your app can query the display manager forthe system’s preferred Presentation display and receive callbacks when thatdisplay changes. Alternatively, you can use the media router service, extendedin Android 4.2, to receive notifications when a system video route changes. Yourapp can display content by default in the main Activity until a preferredPresentation display is attached, at which time it can automatically switch toPresentation content on the preferred display. Your apps can also use mediarouter’s MediaRouteActionProvider and MediaRouteButton to offer standarddisplay-selection UI.

Protected content

For apps that handle protected or encrypted content, the display API nowreports the secure video capabilities of attached displays. Your app query adisplay to find out if it offers a secure video output or provides protectedgraphics buffers and then choose the appropriate content stream or decoding tomake the content viewable. For additional security on SurfaceView objects, yourapp can set a secure flag to indicate that the contents should never appear inscreenshots or on a non-secure display output, even when mirrored.

Wireless display

Starting in Android 4.2, users on supported devices can connect to anexternal display over Wi-Fi, using Miracast, apeer-to-peer wireless display standard created by the Wi-Fi Alliance. When a wireless display isconnected, users can stream any type of content to the big screen, includingphotos, games, maps, and more.

Apps can take advantage of wireless displays in the same way as they do otherexternal displays and no extra work is needed. The system manages the networkconnection and streams your Presentation or other app content to the wirelessdisplay as needed.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值