<img src="https://img.shields.io/badge/%20-ENTERPRISE-%23B10031" style="float:left"/><br />

By requiring authorization from a key manager, DRM protects content from unauthorized consumption. However, there are situations when your viewers are offline and cannot immediately request this authorization. This article explains how to set up offline DRM playback in your Android app.

<br /> <hr />

## Requirements

  • <a href="https://docs.jwplayer.com/platform/docs/protection-studio-drm-generate-a-signed-content-url-for-drm-playback#media_id" target="_blank">Media ID</a>

  • <a href="https://docs.jwplayer.com/platform/docs/protection-studio-drm-generate-a-signed-content-url-for-drm-playback#policy_id" target="_blank">Policy ID</a>

<br /> <hr />

## Implementation

  1. ο»Ώ[Update the **AndroidManifest.xml** file](πŸ”—ο»Ώ).

  2. Make a `GET https://cdn.jwplayer.com/v2/media/{media_id}/drm/{policy_id}` call to download the offline DRM content. Be sure to replace the `{media_id}` and `{policy_id}` placeholders.

  3. Use the following recipe in the Activity to set up the player with the offline DRM content.

<br />

Android v4: Set up a player with offline DRM content
Open Recipe

<br /> <br />

### Update the AndroidManifest.xml

  1. Add the following permissions:

    • `android.permission.FOREGROUND_SERVICE`

    • `android.permission.RECEIVE_BOOT_COMPLETED`

  2. Register the download service (`com.longtailvideo.jwplayer.drm.download.DrmDownloadService`).

<br />


<br />

<!-- Removes the automatic page-to-page navigation at the bottom of the page -->

<style> .rm-Pagination { display: none; } </style>