Home | History | Annotate | Download | only in drm
      1 <HTML>
      2 <BODY>
      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>
      5 <ul>
      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>
     15 </ul>
     16 
     17 <h2>DRM Overview</h2>
     18 
     19 <p>The Android platform provides an extensible DRM framework that lets applications manage
     20 rights-protected content according to the license constraints that are associated with the
     21 content. The DRM framework supports many DRM schemes; which DRM schemes a device supports
     22 is up to the device manufacturer.</p>
     23 
     24 <p>The Android DRM framework is implemented in two architectural layers (see figure below):</p>
     25 <ul>
     26   <li>A DRM framework API, which is exposed to applications through the Android
     27 application 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
     29 interface for DRM plug-ins (agents) to handle rights management and decryption for various
     30 DRM schemes.</li>
     31 </ul>
     32 
     33 <img src="../../../images/drm_arch.png" alt="DRM architecture diagram" border="0"/>
     34 
     35 <p>For application developers, the DRM framework offers an abstract, unified API that
     36 simplifies the management of rights-protected content. The API hides the complexity of DRM
     37 operations and allows a consistent operation mode for both rights-protected and unprotected content
     38 across a variety of DRM schemes. For device manufacturers, content owners, and Internet digital
     39 media providers the DRM frameworks plugin architecture provides a means of adding support for a
     40 specific DRM scheme to the Android system.</p>
     41 
     42 <h2>Using the DRM API</h2>
     43 
     44 <p>In a typical DRM session, an Android application uses the DRM framework API to
     45 instantiate a {@link android.drm.DrmManagerClient}. The application calls various methods
     46 on 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
     48 differentiate callers.</p>
     49 
     50 <p>Although each DRM plug-in may require a different sequence
     51 of API calls, the general call sequence for an application is as follows:</p>
     52 
     53 <ul>
     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
     56 acquireDrmInfo()} method to acquire the registration information, and then using the {@link
     57 android.drm.DrmManagerClient#processDrmInfo processDrmInfo()} method to process the
     58 registration 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
     62 acquireDrmInfo()} method to acquire the license information, and then using the {@link
     63 android.drm.DrmManagerClient#processDrmInfo processDrmInfo()} method to process the
     64 license information. You can also use the {@link
     65 android.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>
     75 </ul>
     76 
     77 <p>After you make an association between the rights-protected content and its license,
     78 the DRM manager automatically handles rights management for that content. Specifically, the
     79 DRM manager will handle all further licensing checks when you attempt to play the content using
     80 the {@link android.media.MediaPlayer} API.</p>
     81 
     82 <p>To learn how to use the DRM API with a specific DRM plug-in, see the documentation provided
     83 by the plug-in developer.</p>
     84 </BODY>
     85 </HTML>
     86