Plugins should implement binderized HALs. All devices launching with Android 8. For example, to add interface 1. Versions 1. Devices upgrading to R are still allowed to run versions 1. However, new devices launching with R must run only version1. The vendor manifest. We recommend using regular expressions to specify the version numbers to avoid making updates for new releases, for example:. See Android Init Language for details. The DrmHal class searches for registered DRM plugin services and constructs corresponding plugins that support a given crypto scheme through the DrmFactory class.
The 1. New in 1. Determines if the plugin factory is able to construct DRM plugins that support a given media container format specified by mimeType. The CryptoHal class searches for registered DRM plugin services and constructs corresponding plugins that support a given crypto scheme through the CryptoFactory class.
Determines if the crypto factory is able to construct crypto plugins that support a given crypto scheme, which is specified by a UUID. Determines if the plugin factory is able to construct crypto plugins that support a given crypto scheme, which is specified by a UUID.
Content and code samples on this page are subject to the licenses described in the Content License. Docs Getting Started About. Core Topics Architecture. Overview Architecture. Modular System Components.
Modular Kernels. HIDL General. For more information, see Handling Configuration Changes. ActivityOptions provides two new methods to support multiple displays:. The adb shell is extended to support multiple displays. The shell start command can now be used to launch an activity, and to specify the activity's target display:. Specifically, you can now use the following attributes in your layout XML files:.
You can set these values yourself, in addition to the new vertical and horizontal layout attributes, to create layout behavior that depends on the text direction. Some apps, such as games, remote desktop, and virtualization clients, greatly benefit from getting control over the mouse pointer. Pointer capture is a new feature in Android 8.
Starting in Android 8. The mouse pointer is hidden while in this mode. The view can release pointer capture when it doesn't need the mouse information anymore. The system can also release pointer capture when the view loses focus, for example, when the user opens another app. For information on how to use this feature in your app, see Pointer capture. These categories are used to cluster together apps of similar purpose or function when presenting them to users, such as in Data Usage, Battery Usage, or Storage Usage.
The new home screen organizes video content in rows corresponding to channels, which are each populated with programs by an app on the system.
Apps can publish multiple channels, and users can configure which channels that they wish to see on the home screen. The Android TV home screen also includes a Watch Next row, which is populated with programs from apps, based on the viewing habits of the user.
Apps can also provide video previews, which are automatically played when a user focuses on a program. Seeking lets you set the position of the animation set to a specific point in time. Playing in reverse is useful if your app includes animations for actions that can be undone.
Instead of defining two separate animation sets, you can play the same one in reverse. If an activity in your app uses a complex view hierarchy, such as the one in Figure 2, consider organizing groups of UI elements into clusters for easier keyboard navigation among them.
Good examples of clusters include: side panels, navigation bars, main content areas, and elements that could contain many child elements.
Note: Clusters cannot be nested, although non-nested clusters may appear at different levels of the hierarchy. If you attempt to nest clusters, the framework treats only the top-most ViewGroup element as a cluster. On devices that have touchscreens, you can set a cluster-designated ViewGroup object's android:touchscreenBlocksFocus element to true to allow cluster-only navigation into and out of that cluster.
If you apply this configuration to a cluster, users cannot use the Tab key or arrow keys to navigate into or out of the cluster; they must press the cluster navigation keyboard combination instead.
Activities and services can use instances of TextToSpeech to dictate and pronounce content. As of Android 8. You can use this functionality to call attention to specific words as the text-to-speech engine speaks them. To use these text-to-speech engine improvements in your app, register an instance of UtteranceProgressListener. As part of the registration process, include a handler for the onRangeStart method. The text-to-speech engine calls rangeStart to record the point in time at which it expects audio playback of a specific range of text to start.
When the audio for that text range starts playback, your app's onRangeStart method executes. Your app can then respond to this callback, such as by highlighting the text range that's associated with the utterance. For more information about tracking the playback progress of a text-to-speech engine, see the UtteranceProgressListener class reference.
When the system needs to free up disk space, it will start by deleting cached files from apps that are the most over their allocated quota. Thus, if you keep your cached data under your allocated quota, your cached files will be some of the last on the system to be cleared when necessary. When the system is deciding what cached files to delete inside your app, it will consider the oldest files first as determined by modified time.
There are also two new behaviors that you can enable on a per-directory basis to control how the system frees up your cached data:. Finally, when you need to allocate disk space for large files, consider using the new allocateBytes FileDescriptor, long API, which will automatically clear cached files belonging to other apps as needed to meet your request.
When deciding if the device has enough disk space to hold your new data, call getAllocatableBytes UUID instead of using getUsableSpace , since the former will consider any cached data that the system is willing to clear on your behalf.
We've updated content providers to include support for loading a large dataset one page at a time. For example, a photo app with many thousands of images can query for a subset of the data to present in a page. Each page of results returned by a content provider is represented by a single Cursor object.
Both a client and a provider must implement paging to make use of this feature. For detailed information about the changes to content providers, see ContentProvider and ContentProviderClient. The ContentProvider and ContentResolver classes now each include a refresh method, making it easier for clients to know whether the information they request is up-to-date. See figure 1 for a comparison of some of the changes to the AudioFormat enum type in V Figure 1: Comparison of some of the changes to the AudioFormat enum.
Refer to the following list for the enum types that have been converted to String :. String values are used for transferring information as enumeration values across the HAL interface boundary. Both the framework and the HAL wrapper use integer enum values for implementing business logic and employ the conversion approach depicted in figure 2.
As seen in the following example, a space is used to delimit the list of values for channelMasks :. Some data structures are redefined in V7 in order to minimize duplicate definitions. Repeated tuples of data items are grouped together into reusable structures.
These data structures use the latest HIDL features like safe unions. To remove this redundancy, in V7, the AudioConfigBase data type and other data types are defined as follows:. The RecordTrackMetadata structure is implemented in a similar fashion by adding tags specific for the recording track metadata. Content and code samples on this page are subject to the licenses described in the Content License.
Docs Getting Started About. Core Topics Architecture. Overview Architecture. Modular System Components. Modular Kernels. HIDL General. Core topics. App compatibility. Interact with other apps. Package visibility. Intents and intent filters. User interface. Add motion to your layout with MotionLayout. MotionLayout XML reference. Improving layout performance. Custom view components.
Look and feel. Splash screens. Add the app bar. Control the system UI visibility. Supporting swipe-to-refresh. Pop-up messages overview. Adding search functionality. Creating backward-compatible UIs. Home channels for mobile apps. App widgets. Media app architecture. Building an audio app.
Building a video app. The Google Assistant. Routing between devices. Background tasks. Manage device awake state. Save to shared storage. Save data in a local database. Sharing simple data. Sharing files. Sharing files with NFC. Printing files. Content providers. Autofill framework. Contacts provider. Data backup. Remember and authenticate users. User location. Using touch gestures.
Handling keyboard input. Supporting game controllers. Input method editors. Performing network operations. Transmit network data using Volley. Perform network operations using Cronet.
Transferring data without draining the battery. Reduce network battery drain. Transfer data using Sync Adapters. Bluetooth Low Energy.
Wi-Fi infrastructure. Discover and connect. Runtime API reference. Web-based content. Android App Bundles. Google Play.
0コメント