Skip to content

Most visited

Recently visited

navigation

MediaDrm.KeyRequest

public static final class MediaDrm.KeyRequest
extends Object

java.lang.Object
   ↳ android.media.MediaDrm.KeyRequest


Contains the opaque data an app uses to request keys from a license server

Summary

Constants

int REQUEST_TYPE_INITIAL

Key request type is initial license request

int REQUEST_TYPE_RELEASE

Key request type is license release

int REQUEST_TYPE_RENEWAL

Key request type is license renewal

Public methods

byte[] getData()

Get the opaque message data

String getDefaultUrl()

Get the default URL to use when sending the key request message to a server, if known.

int getRequestType()

Get the type of the request

Inherited methods

From class java.lang.Object

Constants

REQUEST_TYPE_INITIAL

Added in API level 23
int REQUEST_TYPE_INITIAL

Key request type is initial license request

Constant Value: 0 (0x00000000)

REQUEST_TYPE_RELEASE

Added in API level 23
int REQUEST_TYPE_RELEASE

Key request type is license release

Constant Value: 2 (0x00000002)

REQUEST_TYPE_RENEWAL

Added in API level 23
int REQUEST_TYPE_RENEWAL

Key request type is license renewal

Constant Value: 1 (0x00000001)

Public methods

getData

Added in API level 18
byte[] getData ()

Get the opaque message data

Returns
byte[]

getDefaultUrl

Added in API level 18
String getDefaultUrl ()

Get the default URL to use when sending the key request message to a server, if known. The app may prefer to use a different license server URL from other sources. This method returns an empty string if the default URL is not known.

Returns
String

getRequestType

Added in API level 23
int getRequestType ()

Get the type of the request

Returns
int one of REQUEST_TYPE_INITIAL, REQUEST_TYPE_RENEWAL or REQUEST_TYPE_RELEASE
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.