KeyRequest
class KeyRequest
| kotlin.Any | |
| ↳ | android.media.MediaDrm.KeyRequest |
Contains the opaque data an app uses to request keys from a license server. These request types may or may not be generated by a given plugin. Refer to plugin vendor documentation for more information.
Summary
| Constants | |
|---|---|
| static Int |
Key request type is initial license request. |
| static Int |
Keys are already loaded and are available for use. |
| static Int |
Key request type is license release |
| static Int |
Key request type is license renewal. |
| static Int |
Keys have been loaded but an additional license request is needed to update their values. |
| Public methods | |
|---|---|
| ByteArray |
getData()Get the opaque message data |
| String |
Get the default URL to use when sending the key request message to a server, if known. |
| Int |
Get the type of the request |
Constants
REQUEST_TYPE_INITIAL
static val REQUEST_TYPE_INITIAL: Int
Key request type is initial license request. A license request is necessary to load keys.
Value: 0REQUEST_TYPE_NONE
static val REQUEST_TYPE_NONE: Int
Keys are already loaded and are available for use. No license request is necessary, and no key request data is returned.
Value: 3REQUEST_TYPE_RELEASE
static val REQUEST_TYPE_RELEASE: Int
Key request type is license release
Value: 2REQUEST_TYPE_RENEWAL
static val REQUEST_TYPE_RENEWAL: Int
Key request type is license renewal. A license request is necessary to prevent the keys from expiring.
Value: 1REQUEST_TYPE_UPDATE
static val REQUEST_TYPE_UPDATE: Int
Keys have been loaded but an additional license request is needed to update their values.
Value: 4Public methods
getData
fun getData(): ByteArray
Get the opaque message data
| Return | |
|---|---|
ByteArray |
This value cannot be null. |
getDefaultUrl
fun getDefaultUrl(): String
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.
| Return | |
|---|---|
String |
This value cannot be null. |
getRequestType
fun getRequestType(): Int
Get the type of the request