3<p>Provides classes for managing DRM content and determining the capabilities of DRM plugins
4(agents). Common uses of the DRM API include:</p>
6  <li>Determining which DRM plug-ins (agents) are installed on a device.</li>
7  <li>Retrieving information about specific plug-ins, such as the MIME types and file suffixes
8  they support.</li>
9  <li>Registering a user or a device with an online DRM service.</li>
10  <li>Retrieving license constraints for rights-protected content.</li>
11  <li>Checking whether a user has the proper rights to play or use rights-protected
12  content.</li>
13  <li>Associating rights-protected content with its license so you can use the
14  {@link android.media.MediaPlayer} API to play the content.</li>
17<h2>DRM Overview</h2>
19<p>The Android platform provides an extensible DRM framework that lets applications manage
20rights-protected content according to the license constraints that are associated with the
21content. The DRM framework supports many DRM schemes; which DRM schemes a device supports
22is up to the device manufacturer.</p>
24<p>The Android DRM framework is implemented in two architectural layers (see figure below):</p>
26  <li>A DRM framework API, which is exposed to applications through the Android
27application framework and runs through the Dalvik VM for standard applications.</li>
28  <li>A native code DRM manager, which implements the DRM framework and exposes an
29interface for DRM plug-ins (agents) to handle rights management and decryption for various
30DRM schemes.</li>
33<img src="/images/drm_arch.png" alt="DRM architecture diagram" border="0"/>
35<p>For application developers, the DRM framework offers an abstract, unified API that
36simplifies the management of rights-protected content. The API hides the complexity of DRM
37operations and allows a consistent operation mode for both rights-protected and unprotected content
38across a variety of DRM schemes. For device manufacturers, content owners, and Internet digital
39media providers the DRM framework’s plugin architecture provides a means of adding support for a
40specific DRM scheme to the Android system.</p>
42<h2>Using the DRM API</h2>
44<p>In a typical DRM session, an Android application uses the DRM framework API to
45instantiate a {@link android.drm.DrmManagerClient}. The application calls various methods
46on the DRM client to query rights and perform other DRM-related tasks. Each
47{@link android.drm.DrmManagerClient} instance has its own unique ID, so the DRM manager is able to
48differentiate callers.</p>
50<p>Although each DRM plug-in may require a different sequence
51of API calls, the general call sequence for an application is as follows:</p>
54  <li>Register the device with an online DRM service.
55    <p>You can do this by first using the {@link android.drm.DrmManagerClient#acquireDrmInfo
56acquireDrmInfo()} method to acquire the registration information, and then using the {@link
57android.drm.DrmManagerClient#processDrmInfo processDrmInfo()} method to process the
58registration information.</p>
59  </li>
60  <li>Acquire the license that's associated with the rights-protected content.
61    <p>You can do this by first using the {@link android.drm.DrmManagerClient#acquireDrmInfo
62acquireDrmInfo()} method to acquire the license information, and then using the {@link
63android.drm.DrmManagerClient#processDrmInfo processDrmInfo()} method to process the
64license information. You can also use the {@link
65android.drm.DrmManagerClient#acquireRights acquireRights()} method.</p>
66  </li>
67  <li>Extract constraint information from the license.
68    <p>You can use the {@link android.drm.DrmManagerClient#getConstraints getConstraints()}
69    method to do this.</p>
70  </li>
71  <li>Associate the rights-protected content with its license.
72    <p>You can use the {@link android.drm.DrmManagerClient#saveRights saveRights()} method
73    to do this.</p>
74  </li>
77<p>After you make an association between the rights-protected content and its license,
78the DRM manager automatically handles rights management for that content. Specifically, the
79DRM manager will handle all further licensing checks when you attempt to play the content using
80the {@link android.media.MediaPlayer} API.</p>
82<p>To learn how to use the DRM API with a specific DRM plug-in, see the documentation provided
83by the plug-in developer.</p>