# DrmInfoRequest

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/drm/DrmInfoRequest#constants)\|[Ctors](https://developer.android.com/reference/android/drm/DrmInfoRequest#pubctors)\|[Methods](https://developer.android.com/reference/android/drm/DrmInfoRequest#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/drm/DrmInfoRequest#inhmethods)  

# DrmInfoRequest

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/drm/DrmInfoRequest "View this page in Kotlin")\|Java

`
public


class
DrmInfoRequest
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|----------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.drm.DrmInfoRequest |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 30.**   
Please use[MediaDrm](https://developer.android.com/reference/android/media/MediaDrm)

An entity class that is used to pass information to an online DRM server. An instance of this class is passed to the[acquireDrmInfo()](https://developer.android.com/reference/android/drm/DrmManagerClient#acquireDrmInfo(android.drm.DrmInfoRequest))method to get an instance of a[DrmInfo](https://developer.android.com/reference/android/drm/DrmInfo).

## Summary

|                                                                                                                             ### Constants                                                                                                                              ||
|--------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [ACCOUNT_ID](https://developer.android.com/reference/android/drm/DrmInfoRequest#ACCOUNT_ID) Key that is used to pass the unique session ID for the account or the user.                            |
| [String](https://developer.android.com/reference/java/lang/String) | [SUBSCRIPTION_ID](https://developer.android.com/reference/android/drm/DrmInfoRequest#SUBSCRIPTION_ID) Key that is used to pass the unique session ID for the subscription.                         |
| `int`                                                              | [TYPE_REGISTRATION_INFO](https://developer.android.com/reference/android/drm/DrmInfoRequest#TYPE_REGISTRATION_INFO) Acquires DRM server registration information.                                  |
| `int`                                                              | [TYPE_RIGHTS_ACQUISITION_INFO](https://developer.android.com/reference/android/drm/DrmInfoRequest#TYPE_RIGHTS_ACQUISITION_INFO) Acquires rights information.                                       |
| `int`                                                              | [TYPE_RIGHTS_ACQUISITION_PROGRESS_INFO](https://developer.android.com/reference/android/drm/DrmInfoRequest#TYPE_RIGHTS_ACQUISITION_PROGRESS_INFO) Acquires the progress of the rights acquisition. |
| `int`                                                              | [TYPE_UNREGISTRATION_INFO](https://developer.android.com/reference/android/drm/DrmInfoRequest#TYPE_UNREGISTRATION_INFO) Acquires information for unregistering the DRM server.                     |

|                                                                                                                                   ### Public constructors                                                                                                                                   ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[DrmInfoRequest](https://developer.android.com/reference/android/drm/DrmInfoRequest#DrmInfoRequest(int,%20java.lang.String))`(int infoType, `[String](https://developer.android.com/reference/java/lang/String)` mimeType) ` Creates a`DrmInfoRequest`object with type and MIME type. |

|                                                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Object](https://developer.android.com/reference/java/lang/Object)                                                                             | ` `[get](https://developer.android.com/reference/android/drm/DrmInfoRequest#get(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` key) ` Retrieves the value of a given key.                                                                                                                          |
| ` int`                                                                                                                                            | ` `[getInfoType](https://developer.android.com/reference/android/drm/DrmInfoRequest#getInfoType())`() ` Retrieves the information type associated with this object.                                                                                                                                                                          |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                                                             | ` `[getMimeType](https://developer.android.com/reference/android/drm/DrmInfoRequest#getMimeType())`() ` Retrieves the MIME type associated with this object.                                                                                                                                                                                 |
| ` `[Iterator](https://developer.android.com/reference/java/util/Iterator)`<`[Object](https://developer.android.com/reference/java/lang/Object)`>` | ` `[iterator](https://developer.android.com/reference/android/drm/DrmInfoRequest#iterator())`() ` Retrieves an iterator object that you can use to iterate over the values associated with this`DrmInfoRequest`object.                                                                                                                       |
| ` `[Iterator](https://developer.android.com/reference/java/util/Iterator)`<`[String](https://developer.android.com/reference/java/lang/String)`>` | ` `[keyIterator](https://developer.android.com/reference/android/drm/DrmInfoRequest#keyIterator())`() ` Retrieves an iterator object that you can use to iterate over the keys associated with this`DrmInfoRequest`object.                                                                                                                   |
| ` void`                                                                                                                                           | ` `[put](https://developer.android.com/reference/android/drm/DrmInfoRequest#put(java.lang.String,%20java.lang.Object))`(`[String](https://developer.android.com/reference/java/lang/String)` key, `[Object](https://developer.android.com/reference/java/lang/Object)` value) ` Adds optional information as key-value pairs to this object. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### ACCOUNT_ID

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final String ACCOUNT_ID
```

Key that is used to pass the unique session ID for the account or the user.

<br />

Constant Value: "account_id"  

### SUBSCRIPTION_ID

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final String SUBSCRIPTION_ID
```

Key that is used to pass the unique session ID for the subscription.

<br />

Constant Value: "subscription_id"  

### TYPE_REGISTRATION_INFO

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int TYPE_REGISTRATION_INFO
```

Acquires DRM server registration information.

<br />

Constant Value: 1 (0x00000001)  

### TYPE_RIGHTS_ACQUISITION_INFO

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int TYPE_RIGHTS_ACQUISITION_INFO
```

Acquires rights information.

<br />

Constant Value: 3 (0x00000003)  

### TYPE_RIGHTS_ACQUISITION_PROGRESS_INFO

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int TYPE_RIGHTS_ACQUISITION_PROGRESS_INFO
```

Acquires the progress of the rights acquisition.

<br />

Constant Value: 4 (0x00000004)  

### TYPE_UNREGISTRATION_INFO

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int TYPE_UNREGISTRATION_INFO
```

Acquires information for unregistering the DRM server.

<br />

Constant Value: 2 (0x00000002)

## Public constructors

### DrmInfoRequest

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public DrmInfoRequest (int infoType, 
                String mimeType)
```

Creates a`DrmInfoRequest`object with type and MIME type.

<br />

|                   Parameters                   ||
|------------|------------------------------------|
| `infoType` | `int`: Type of information. <br /> |
| `mimeType` | `String`: MIME type. <br />        |

## Public methods

### get

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Object get (String key)
```

Retrieves the value of a given key.

<br />

|                           Parameters                            ||
|-------|----------------------------------------------------------|
| `key` | `String`: The key whose value is being retrieved. <br /> |

|                                                                              Returns                                                                              ||
|--------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| [Object](https://developer.android.com/reference/java/lang/Object) | The value of the key that is being retrieved. Returns null if the key cannot be found. <br /> |

### getInfoType

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getInfoType ()
```

Retrieves the information type associated with this object.

<br />

|               Returns               ||
|-------|------------------------------|
| `int` | The information type. <br /> |

### getMimeType

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getMimeType ()
```

Retrieves the MIME type associated with this object.

<br />

|                                          Returns                                          ||
|--------------------------------------------------------------------|-----------------------|
| [String](https://developer.android.com/reference/java/lang/String) | The MIME type. <br /> |

### iterator

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Iterator<Object> iterator ()
```

Retrieves an iterator object that you can use to iterate over the values associated with this`DrmInfoRequest`object.

<br />

|                                                                                   Returns                                                                                   ||
|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [Iterator](https://developer.android.com/reference/java/util/Iterator)`<`[Object](https://developer.android.com/reference/java/lang/Object)`>` | The iterator object. <br /> |

### keyIterator

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Iterator<String> keyIterator ()
```

Retrieves an iterator object that you can use to iterate over the keys associated with this`DrmInfoRequest`object.

<br />

|                                                                                   Returns                                                                                   ||
|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [Iterator](https://developer.android.com/reference/java/util/Iterator)`<`[String](https://developer.android.com/reference/java/lang/String)`>` | The iterator object. <br /> |

### put

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void put (String key, 
                Object value)
```

Adds optional information as key-value pairs to this object.

<br />

|                 Parameters                  ||
|---------|------------------------------------|
| `key`   | `String`: The key to add. <br />   |
| `value` | `Object`: The value to add. <br /> |