Android.Drm Namespace

Provides classes for managing DRM content and determining the capabilities of DRM plugins (agents).

Remarks

Provides classes for managing DRM content and determining the capabilities of DRM plugins (agents). Common uses of the DRM API include:

DRM Overview

The Android platform provides an extensible DRM framework that lets applications manage rights-protected content according to the license constraints that are associated with the content. The DRM framework supports many DRM schemes; which DRM schemes a device supports is up to the device manufacturer.

The Android DRM framework is implemented in two architectural layers (see figure below):

For application developers, the DRM framework offers an abstract, unified API that simplifies the management of rights-protected content. The API hides the complexity of DRM operations and allows a consistent operation mode for both rights-protected and unprotected content across a variety of DRM schemes. For device manufacturers, content owners, and Internet digital media providers the DRM framework’s plugin architecture provides a means of adding support for a specific DRM scheme to the Android system.

Using the DRM API

In a typical DRM session, an Android application uses the DRM framework API to instantiate a Android.Drm.DrmManagerClient. The application calls various methods on the DRM client to query rights and perform other DRM-related tasks. Each Android.Drm.DrmManagerClient instance has its own unique ID, so the DRM manager is able to differentiate callers.

Although each DRM plug-in may require a different sequence of API calls, the general call sequence for an application is as follows:

You can do this by first using the Android.Drm.DrmManagerClient.AcquireDrmInfo(Android.Drm.DrmInfoRequest) method to acquire the registration information, and then using the Android.Drm.DrmManagerClient.ProcessDrmInfo(Android.Drm.DrmInfo) method to process the registration information.

You can do this by first using the Android.Drm.DrmManagerClient.AcquireDrmInfo(Android.Drm.DrmInfoRequest) method to acquire the license information, and then using the Android.Drm.DrmManagerClient.ProcessDrmInfo(Android.Drm.DrmInfo) method to process the license information. You can also use the Android.Drm.DrmManagerClient.AcquireRights(Android.Drm.DrmInfoRequest) method.

You can use the Android.Drm.DrmManagerClient.GetConstraints(Android.Net.Uri, Android.Drm.DrmStoreActionCode) method to do this.

You can use the Android.Drm.DrmManagerClient.SaveRights(Android.Drm.DrmRights, System.String, System.String) method to do this.

After you make an association between the rights-protected content and its license, the DRM manager automatically handles rights management for that content. Specifically, the DRM manager will handle all further licensing checks when you attempt to play the content using the Android.Media.MediaPlayer API.

To learn how to use the DRM API with a specific DRM plug-in, see the documentation provided by the plug-in developer.

Classes

TypeReason
DrmConvertedStatusAn entity class that wraps converted data, conversion status, and the offset for appending the header and body signature to the converted data.
DrmConvertedStatusCodeEnumerates values returned by several types and taken as a parameter of the Android.Drm.DrmConvertedStatus..ctor member.
DrmErrorEventAn entity class that is passed to the NoType:android/drm/DrmManagerClient$OnErrorListener;Href=../../../reference/android/drm/DrmManagerClient.OnErrorListener.html#onError(android.drm.DrmManagerClient, android.drm.DrmErrorEvent) callback.
DrmErrorEventTypeEnumerates values returned by several types and taken as a parameter of the Android.Drm.DrmErrorEvent..ctor, and Android.Drm.DrmErrorEvent..ctor members.
DrmEventA base class that is used to send asynchronous event information from the DRM framework.
DrmEventTypeEnumerates values returned by several types.
DrmInfoAn entity class that describes the information required to send transactions between a device and an online DRM server.
DrmInfoEventAn entity class that is passed to the NoType:android/drm/DrmManagerClient$OnInfoListener;Href=../../../reference/android/drm/DrmManagerClient.OnInfoListener.html#onInfo(android.drm.DrmManagerClient, android.drm.DrmInfoEvent) callback.
DrmInfoEventTypeEnumerates values returned by several types and taken as a parameter of several types.
DrmInfoRequestAn entity class that is used to pass information to an online DRM server.
DrmInfoRequestTypeEnumerates values returned by several types and taken as a parameter of the Android.Drm.DrmInfoRequest..ctor, and Android.Drm.DrmInfoStatus..ctor members.
DrmInfoStatusAn entity class that wraps the result of communication between a device and an online DRM server.
DrmInfoStatusCodeEnumerates values returned by the Android.Drm.DrmInfoStatus.StatusCode, Android.Drm.DrmInfoStatusCode.Error, and Android.Drm.DrmInfoStatusCode.OK members and taken as a parameter of the Android.Drm.DrmInfoStatus..ctor member.
DrmManagerClientThe main programming interface for the DRM framework.
DrmManagerClient+ErrorEventArgsProvides data for the Android.Drm.DrmManagerClient.Error event.
DrmManagerClient+EventEventArgsProvides data for the Android.Drm.DrmManagerClient.Event event.
DrmManagerClient+InfoEventArgsProvides data for the Android.Drm.DrmManagerClient.Info event.
DrmManagerClient+IOnErrorListenerInterface definition for a callback that receives information about DRM framework errors.
DrmManagerClient+IOnEventListenerInterface definition for a callback that receives information about DRM processing events.
DrmManagerClient+IOnInfoListenerInterface definition for a callback that receives status messages and warnings during registration and rights acquisition.
DrmManagerClientErrorCodeEnumerates values returned by several types.
DrmRightsAn entity class that wraps the license information retrieved from the online DRM server.
DrmStoreDefines constants that are used by the DRM framework.
DrmStore+ActionDefines actions that can be performed on rights-protected content.
DrmStore+ConstraintsColumnsInterface definition for the columns that represent DRM constraints.
DrmStore+ConstraintsColumnsConstsDocumentation for this section has not yet been entered.
DrmStore+DrmObjectTypeDefines DRM object types.
DrmStore+PlaybackDefines playback states for content.
DrmStore+RightsStatusDefines status notifications for digital rights.
DrmStoreActionCodeEnumerates values returned by several methods of Android.Drm.DrmStoreActionCode and taken as a parameter of several methods of Android.Drm.DrmManagerClient.
DrmStoreObjectTypeCodeEnumerates values returned by several types.
DrmStorePlaybackCodeEnumerates values returned by several methods of Android.Drm.DrmStorePlaybackCode.
DrmStoreRightsStatusCodeEnumerates values returned by several types.
DrmSupportInfoAn entity class that wraps the capability of each DRM plug-in (agent), such as the MIME type and file suffix the DRM plug-in can handle.
DrmUtilsA utility class that provides operations for parsing extended metadata embedded in DRM constraint information.
DrmUtils+ExtendedMetadataParserUtility that parses extended metadata embedded in DRM constraint information.
ProcessedDataAn entity class that wraps the result of a Android.Drm.DrmManagerClient.ProcessDrmInfo(Android.Drm.DrmInfo) transaction between a device and a DRM server.