# MediaDrm.ProvisionRequest

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

# ProvisionRequest

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/media/MediaDrm.ProvisionRequest "View this page in Java")  

```
class ProvisionRequest
```

|---|------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                     ||
| ↳ | [android.media.MediaDrm.ProvisionRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm.ProvisionRequest#) |

Contains the opaque data an app uses to request a certificate from a provisioning server

## Summary

|                                                                                                                                                  Public methods                                                                                                                                                   ||
|-----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) | [getData](https://developer.android.com/reference/kotlin/android/media/MediaDrm.ProvisionRequest#getData())`()` Get the opaque message data                                                                              |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)        | [getDefaultUrl](https://developer.android.com/reference/kotlin/android/media/MediaDrm.ProvisionRequest#getDefaultUrl())`()` Get the default URL to use when sending the provision request message to a server, if known. |

## Public methods

### getData

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

```
fun getData(): ByteArray
```

Get the opaque message data

|                                                        Return                                                        ||
|-----------------------------------------------------------------------------------------|-----------------------------|
| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html) | This value cannot be`null`. |

### getDefaultUrl

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

```
fun getDefaultUrl(): String
```

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

|                                                    Return                                                     ||
|----------------------------------------------------------------------------------|-----------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | This value cannot be`null`. |