Android TV developer overview presentation from Linaro Connect US 2014 (LCU14)
#1
Many here already know that 3-months ago Google announced the new "Android TV" platform based on upcoming release of Android L, which will finally replace the old Google TV and bring a more user-friendly user-experience to Android televisions and set-top boxes. While this platform could be very tough competition for Kodi, it could also give Kodi developers more Android frameworks and APIs to possible be able to make Kodi much better on Android.

Some new official facts about Google's new Android TV platform have finally been posted as of yesterday when Mark Gregotski, the head of the Linaro Digital Home Group (LHG), provided a technical overview of Android TV during the on-going Linaro Connect US 2014 (LCU14) conference.

You can now find a summary of that "LCU14-204 : Overview of Android TV Presentation" sessions on Linaro’s blog here

http://www.linaro.org/blog/lcu14-monday-wrap/

LCU14 session 204 : Overview of Android TV Presentation - Full presentation slideshow and transcript here
http://www.slideshare.net/linaroorg/lcu1...android-tv

Highlights
● One Android SDK for all form factors
● >5000 new APIs
● Fully 64-bit compatible
● Feature’s Google’s latest home entertainment play with Android TV
● Android L Features Android TV related: + H.265 + NDK Media APIs + TV Input Framework + improved AV sync + Cast receiver + 64-bit trusted execution environment + OpenGL ES 3.1 & Android Extension Pack + Closed caption enhancements
● Giving TV the same level of attention as phones/tablets; just a new form factor
● Reduce fragmentation: create a standard for an OS, developer APIs
● Built into TVs, set-tops, streaming consoles, gaming consoles
● Support for gaming and Google Cast (receivers)
● Introduce the “Leanback Experience” with new UI framework classes for the 10-foot viewing perspective
● aggressive hardware specs targeting CPU/GPU performance of gaming stations + stringent security requirements, minimum configuration: 1 GB RAM + 8GB Flash
● Google is actively working with silicon vendors and TV manufacturers
● Established partnerships with pay TV operators: SFR, Bouygues Telecom, LG Uplus
● Performance: raise the bar for big screen glitch-free audio/video sync, 4k video playback, gaming capable, responsive rich UI
● Security: secure boot, protected video path, 64-bit TEE, W3C EME
● Pay TV: gain studio approval to protect HD (1080p) and 4k content, establish Android TV with operators: cable/satellite, telco, IPTV
● Enhanced streaming support
● ExoPlayer: MPEG DASH, Smooth Streaming, open source player with features not provided by MediaPlayer: built on top of the MediaExtractor and MediaCodec APIs
● Subtitles / CC: TTML / CEA-608 in addition to WebVTT: pushing Android media framework to enhance AV pipeline
● TV Quality playback
● Concurrent multiple audio output (PIP)
● Tunneled video/audio support and HW-based AV Sync
● VP9/HEVC codec support for 4k video
● Android TV Multimedia Improvements: TV Input Framework (TIF): reduce fragmentation on your coffee table
● One standard remote control to unify all Live TV input content sources
● Chrome Webview (based on Chromium 36) support for HTML5 Video w/ DRM (EME/MSE)
● OpenGL ES 3.1 + Android Extension Pack (vendor extensions)
● TV Input Framework: Unifying all Live TV sources OVER THE AIR TV TUNER - IP + IP NETWORK UNIFIED CHANNEL + CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL CABLE / SATELLITE CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL CHANNEL
● TV Input Framework: Designed to provide access to a variety of Live TV input sources and bring them together through a single user interface
● Three use cases: Virtual input with external set-top box (Virtual TV Input application communicates w/ STB), IP Input with place-shift device (converts content to IP), Pure IP input (Multicast IP / managed; Adaptive Streaming / unmanaged)
● Android TV -Security: Android TV will provide support for Security Level 1 Widevine and Playready DRM
● Studio approval paves the way for Android TV deployment in cable set-top boxes

Android TV - Summary / Questions
● Android TV uses Trusty Secure OS
● Google wants to reduce complexity in the security space: implementation of Android OEM Crypto APIs
● To satisfy pay-TV operators require L1 security solution with protected video path using ARM TrustZone
● 64-bit TEE secure OS (Trusty) compared with other TLK solutions
● To accommodate operators with legacy CAS, will Google combine provide a framework to combine CA with Widevine DRM?
Android TV - Summary / Questions: Google is getting serious about creating a real set-top to compete with incumbent cable/telco/satellite makers, effort to make Android media framework support glitch-free VP9/HEVC 4k video playback, tunneled implementation, tight coupling between OMX IL and video hardware, specifying a particular OpenMAX integration or any other media framework architecture changes
● EME implementation with Widevine / OEMCrypto support
● WebView implementation of W3C EME/CDM
● CDM implementation via PPAPIs?
● Device discovery via DIAL, compatibility with DLNA?
Reply
#2
Given that XBMC/Kodi already leverages MediaCodec, I wonder how easy it would be to take advantage of that protected video path.
Reply
#3
Note: "This uploaded file has been marked private by the author. Sorry!" both video links.
Reply
#4
All new major features in Android 5.0 (Lollipop) have now been posted on Google's official android.com website

http://www.android.com/versions/lollipop-5-0/

Media
Lower latency audio input ensuring that music and communication applications that have strict delay requirements provide an amazing realtime experience
Multi-channel audio stream mixing means professional audio applications can now mix up to eight channels including 5.1 and 7.1 channels
USB Audio support means you can plug USB microphones, speakers, and a myriad of other USB audio devices like amplifiers and mixers into your Android device
Capture full resolution frames around 30 fps
Support raw formats like YUV and Bayer RAW
State of the art video technology with support for HEVC main profile to allow for UHD 4K 10-bit video playback, tunneled hardware video decoding to save power and improved HLS support for streaming

Android TV
Support for living room devices
User interface adapted for the living room
Less browsing, more watching with personalized recommendations for content like movies and TV shows
Voice search for Google Play, YouTube and supported apps so you can just say what you want to see
Console-style Android gaming on your TV with a gamepad
Cast your favorite entertainment apps to your big screen with Google Cast support for Android TV devices

Runtime and Performance
A faster, smoother and more powerful computing experience
ART, an entirely new Android runtime, improves application performance and responsiveness
Up to 4x performance improvements
Compacting backgrounded apps and services so you can do more at once
Support for 64 bit devices, like the Nexus 9, brings desktop class CPUs to Android
Support for 64-bit SoCs using ARM, x86, and MIPS-based cores
Shipping 64-bit native apps like Chrome, Gmail, Calendar, Google Play Music, and more
Reply
#5
Android SDK Tools Revision 23.0.5 and NDK Revision 10c have also now been released with Google's announcement of Android 5.0 (Lollipop)

https://developer.android.com/tools/sdk/...notes.html
https://developer.android.com/tools/sdk/ndk/index.html


This is the first SDK and NDK revisions to officially have support for making apps for Android TV, as such they include many new APIs just as Android 5.0 contain new features

http://developer.android.com/training/tv...index.html
http://developer.android.com/training/tv/index.html


Because Kodi is a native C++ application that uses the NDK, the most interesting stuff in Android 5.0 (Lollipop) for Kodi developers is probably the new APIs in API Level: 21

http://developer.android.com/about/versi...d-5.0.html


Android 5.0 APIs

API Level: 21



If you haven't tested your app against the new Android Runtime (ART)...


The 4.4 release introduced a new, experimental Android runtime, ART. Under 4.4, ART was optional, and the default runtime remained Dalvik. With Android 5.0, ART is now the default runtime.

For an overview of ART's new features, see Introducing ART. Some of the major new features are:
  • Ahead-of-time (AOT) compilation
  • Improved garbage collection (GC)
  • Improved debugging support
Most Android apps should just work without any changes under ART. However, some techniques that work on Dalvik do not work on ART. For information about the most important issues, see Verifying App Behavior on the Android Runtime (ART). Pay particular attention if:
  • Your app uses Java Native Interface (JNI) to run C/C++ code.
  • You use development tools that generate non-standard code (such as some obfuscators).
  • You use techniques that are incompatible with compacting garbage collection. (ART does not currently implement compacting GC, but compacting GC is under development in the Android Open Source Project.)

If your app uses RemoteControlClient...

The RemoteControlClient class is now deprecated. Switch to the new MediaSession API as soon as possible.

To display media playback controls if your app is running on the Android TV or Wear platform, implement the MediaSession class. You should also implement MediaSession if your app needs to receive media button events on Android devices.


If you are using the Android Native Development Kit (NDK)...

Android 5.0 introduces support for 64-bit systems. The 64-bit enhancement increases address space and improves performance, while still supporting existing 32-bit apps fully. The 64-bit support also improves the performance of OpenSSL for cryptography. In addition, this release introduces new native media NDK APIs, as well as native OpenGL ES (GLES) 3.1 support.

To use the 64-bit support provided in Android 5.0, download and install NDK Revision 10c from the Android NDK page. Refer to the Revision 10c release notes for more information about important changes and bug fixes to the NDK.
If your app binds to a Service...

The Context.bindService() method now requires an explicit Intent, and throws an exception if given an implicit intent. To ensure your app is secure, use an explicit intent when starting or binding your Service, and do not declare intent filters for the service.


If your app binds to a Service...

The Context.bindService() method now requires an explicit Intent, and throws an exception if given an implicit intent. To ensure your app is secure, use an explicit intent when starting or binding your Service, and do not declare intent filters for the service.


Audio playback

This release includes the following changes to AudioTrack:
  • Your app can now supply audio data in floating-point format (ENCODING_PCM_FLOAT). This permits greater dynamic range, more consistent precision, and greater headroom. Floating-point arithmetic is especially useful during intermediate calculations. Playback endpoints use integer format for audio data, and with lower bit depth. (In Android 5.0, portions of the internal pipeline are not yet floating point.)
  • Your app can now supply audio data as a ByteBuffer, in the same format as provided by MediaCodec.
  • The WRITE_NON_BLOCKING option can simplify buffering and multithreading for some apps.

Media playback control

Use the new notification and media APIs to ensure that the system UI knows about your media playback and can extract and show album art. Controlling media playback across a UI and a service is now easier with the new MediaSession and MediaController classes.

The new MediaSession class replaces the deprecated RemoteControlClient class and provides a single set of callback methods for handling transport controls and media buttons. If your app provides media playback and runs on the Android TV or Wear platform, use the MediaSession class to handle your transport controls using the same callback methods.

You can now build your own media controller app with the new MediaController class. This class provides a thread-safe way to monitor and control media playback from your app's UI process. When creating a controller, specify a MediaSession.Token object so that your app can interact with the given MediaSession. By using the MediaController.TransportControls methods, you can send commands such as play(), stop(), skipToNext(), and setRating() to control media playback on that session. With the controller, you can also register a MediaController.Callback object to listen for metadata and state changes on the session.

In addition, you can create rich notifications that allow playback control tied to a media session with the new Notification.MediaStyle class.


Media browsing

Android 5.0 introduces the ability for apps to browse the media content library of another app, through the new android.media.browse API. To expose the media content in your app, extend the MediaBrowserService class. Your implementation of MediaBrowserService should provide access to a MediaSession.Token so that apps can play media content provided through your service.

To interact with a media browser service, use the MediaBrowser class. Specify the component name for a MediaSession when you create an MediaBrowser instance. Using that browser instance, your app can then connect to the associated service and obtain a MediaSession.Token object to play content exposed through that service.


Storage - Directory selection

Android 5.0 extends the Storage Access Framework to let users select an entire directory subtree, giving apps read/write access to all contained documents without requiring user confirmation for each item.

To select a directory subtree, build and send an OPEN_DOCUMENT_TREE intent. The system displays all DocumentsProvider instances that support subtree selection, letting the user browse and select a directory. The returned URI represents access to the selected subtree. You can then use buildChildDocumentsUriUsingTree() and buildDocumentUriUsingTree() along with query() to explore the subtree.

The new createDocument() method lets you create new documents or directories anywhere under the subtree. To manage existing documents, use renameDocument() and deleteDocument(). Check COLUMN_FLAGS to verify provider support for these calls before issuing them.

If you're implementing a DocumentsProvider and want to support subtree selection, implement isChildDocument() and include FLAG_SUPPORTS_IS_CHILD in your COLUMN_FLAGS.

Android 5.0 also introduces new package-specific directories on shared storage where your app can place media files for inclusion in MediaStore. The new getExternalMediaDirs() returns paths to these directories on all shared storage devices. Similarly to getExternalFilesDir(), no additional permissions are needed by your app to access the returned paths. The platform periodically scans for new media in these directories, but you can also use MediaScannerConnection to explicitly scan for new content.


Wireless & Connectivity - Multiple network connections

Android 5.0 provides new multi-networking APIs that let your app dynamically scan for available networks with specific capabilities, and establish a connection to them. This functionality is useful when your app requires a specialized network, such as an SUPL, MMS, or carrier-billing network, or if you want to send data using a particular type of transport protocol.

To select and connect to a network dynamically from your app, follow these steps:

Create a ConnectivityManager.
Use the NetworkRequest.Builder class to create an NetworkRequest object and specify the network features and transport type your app is interested in.
To scan for suitable networks, call requestNetwork() or registerNetworkCallback(), and pass in the NetworkRequest object and an implementation of ConnectivityManager.NetworkCallback. Use the requestNetwork() method if you want to actively switch to a suitable network once it’s detected; to receive only notifications for scanned networks without actively switching, use the registerNetworkCallback() method instead.

When the system detects a suitable network, it connects to the network and invokes the onAvailable() callback. You can use the Network object from the callback to get additional information about the network, or to direct traffic to use the selected network.


Scheduling jobs

Android 5.0 provides a new JobScheduler API that lets you optimize battery life by defining jobs for the system to run asynchronously at a later time or under specified conditions (such as when the device is charging). Job scheduling is useful in such situations as:
  • The app has non-user-facing work that you can defer.
  • The app has work you'd prefer to do when the unit is plugged in.
  • The app has a task that requires network access or a Wi-Fi connection.
  • The app has a number of tasks that you want to run as a batch on a regular schedule.

A unit of work is encapsulated by a JobInfo object. This object specifies the scheduling criteria.

Use the JobInfo.Builder class to configure how the scheduled task should run. You can schedule the task to run under specific conditions, such as:
  • Start when the device is charging
  • Start when the device is connected to an unmetered network
  • Start when the device is idle
  • Finish before a certain deadline or with a minimum delay

Testing and accessibility improvements - Android 5.0 adds the following support for testing and accessibility:

The new getWindowAnimationFrameStats() and getWindowContentFrameStats() methods capture frame statistics for window animations and content. These methods let you write instrumentation tests to evaluate whether an app is rendering frames at a sufficient refresh frequency to provide a smooth user experience.

The new executeShellCommand() method lets you execute shell commands from your instrumentation test. The command execution is similar to running adb shell from a host connected to the device, allowing you to use shell-based tools such as dumpsys, am, content, and pm.

Accessibility services and test tools that use the accessibility APIs (such as UiAutomator) can now retrieve detailed information about the properties of windows on the screen that sighted users can interact with. To retrieve a list of AccessibilityWindowInfo objects, call the new getWindows() method.

The new AccessibilityNodeInfo.AccessibilityAction class lets you define standard or customized actions to perform on an AccessibilityNodeInfo. The new AccessibilityNodeInfo.AccessibilityAction class replaces the actions-related APIs previously found in AccessibilityNodeInfo.

Android 5.0 provides finer-grain control over text-to-speech synthesis in your app. The new Voice class allows your app to use voice profiles associated with specific locales, quality and latency rating, and text-to-speech engine-specific parameters.


Manifest Declarations - Declarable required features

The following values are now supported in the <uses-feature> element, so you can ensure that your app is installed only on devices that provide the features your app needs.
  • FEATURE_AUDIO_OUTPUT
  • FEATURE_CAMERA_CAPABILITY_MANUAL_POST_PROCESSING
  • FEATURE_CAMERA_CAPABILITY_MANUAL_SENSOR
  • FEATURE_CAMERA_CAPABILITY_RAW
  • FEATURE_CAMERA_LEVEL_FULL
  • FEATURE_GAMEPAD
  • FEATURE_LIVE_TV
  • FEATURE_MANAGED_USERS
  • FEATURE_LEANBACK
  • FEATURE_OPENGLES_EXTENSION_PACK
  • FEATURE_SECURELY_REMOVES_USERS
  • FEATURE_SENSOR_AMBIENT_TEMPERATURE
  • FEATURE_SENSOR_RELATIVE_HUMIDITY
  • FEATURE_VERIFIED_BOOT
  • FEATURE_WEBVIEW
Reply

Logout Mark Read Team Forum Stats Members Help
Android TV developer overview presentation from Linaro Connect US 2014 (LCU14)0