# UriHandler

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/platform/UriHandler.kt+class:androidx.compose.ui.platform.UriHandler) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface UriHandler
  ```
Known direct subclasses [AndroidUriHandler](https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/AndroidUriHandler)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/AndroidUriHandler` |   |

*** ** * ** ***

An interface of providing platform specific URL handling.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/UriHandler#openUri(kotlin.String)(uri: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Open given URL in browser | Cmn |

## Public functions

### openUri

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun openUri(uri: String): Unit
```

Open given URL in browser

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | when given `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/UriHandler#openUri(kotlin.String)` is invalid and/or can't be handled by the system |