# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# 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. These request types may or may not be generated by a given plugin. Refer to plugin vendor documentation for more information.

## Summary

### Constants
`int` | `REQUEST_TYPE_INITIAL` Key request type is initial license request.
`int` | `REQUEST_TYPE_NONE` Keys are already loaded and are available for use.
`int` | `REQUEST_TYPE_RELEASE` Key request type is license release
`int` | `REQUEST_TYPE_RENEWAL` Key request type is license renewal.
`int` | `REQUEST_TYPE_UPDATE` Keys have been loaded but an additional license request is needed to update their values.

### 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`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### REQUEST_TYPE_INITIAL

    public static final int REQUEST_TYPE_INITIAL

Key request type is initial license request. A license request is necessary to load keys.

Constant Value: 0 (0x00000000)

### REQUEST_TYPE_NONE

    public static final int REQUEST_TYPE_NONE

Keys are already loaded and are available for use. No license request is necessary, and no key request data is returned.

Constant Value: 3 (0x00000003)

### REQUEST_TYPE_RELEASE

    public static final int REQUEST_TYPE_RELEASE

Key request type is license release

Constant Value: 2 (0x00000002)

### REQUEST_TYPE_RENEWAL

    public static final int REQUEST_TYPE_RENEWAL

Key request type is license renewal. A license request is necessary to prevent the keys from expiring.

Constant Value: 1 (0x00000001)

### REQUEST_TYPE_UPDATE

    public static final int REQUEST_TYPE_UPDATE

Keys have been loaded but an additional license request is needed to update their values.

Constant Value: 4 (0x00000004)

## Public methods

### getData

    public byte[] getData ()

Get the opaque message data

Returns
`byte[]` | This value cannot be `null`.

### getDefaultUrl

    public 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` | This value cannot be `null`.

### getRequestType

    public int getRequestType ()

Get the type of the request

Returns
`int` | Value is `REQUEST_TYPE_INITIAL`, `REQUEST_TYPE_RENEWAL`, `REQUEST_TYPE_RELEASE`, `REQUEST_TYPE_NONE`, or `REQUEST_TYPE_UPDATE`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*