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):

DRM architecture diagram

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 {@link android.drm.DrmManagerClient}. The application calls various methods on the DRM client to query rights and perform other DRM-related tasks. Each {@link 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:

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 {@link 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.