# DebugTextViewHelper

# DebugTextViewHelper

Artifact:[androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/util/DebugTextViewHelper.java+class:androidx.media3.exoplayer.util.DebugTextViewHelper)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/exoplayer/util/DebugTextViewHelper "View this page in Java")

<br />

```
class DebugTextViewHelper
```

<br />

*** ** * ** ***

A helper class for periodically updating a[TextView](https://developer.android.com/reference/android/widget/TextView.html)with debug information obtained from an[ExoPlayer](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ExoPlayer).

## Summary

|                                                                                                                                                                                                ### Public constructors                                                                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [DebugTextViewHelper](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/DebugTextViewHelper#DebugTextViewHelper(androidx.media3.exoplayer.ExoPlayer,android.widget.TextView))`(player: `[ExoPlayer](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ExoPlayer)`!, textView: `[TextView](https://developer.android.com/reference/android/widget/TextView.html)`!)` |

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [start](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/DebugTextViewHelper#start())`()` Starts periodic updates of the[TextView](https://developer.android.com/reference/android/widget/TextView.html). |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [stop](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/DebugTextViewHelper#stop())`()` Stops periodic updates of the[TextView](https://developer.android.com/reference/android/widget/TextView.html).    |

|                               ### Protected functions                                |
|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) [getAudioString](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/DebugTextViewHelper#getAudioString())`()` Returns a string containing audio debugging information.                                                                                            |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) [getDebugString](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/DebugTextViewHelper#getDebugString())`()` Returns the debugging information string to be shown by the target[TextView](https://developer.android.com/reference/android/widget/TextView.html). |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) [getPlayerStateString](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/DebugTextViewHelper#getPlayerStateString())`()` Returns a string containing player state debugging information.                                                                         |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) [getVideoString](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/DebugTextViewHelper#getVideoString())`()` Returns a string containing video debugging information.                                                                                            |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)        | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) [updateAndPost](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/DebugTextViewHelper#updateAndPost())`()`                                                                                                                                                       |

## Public constructors

### DebugTextViewHelper

```
DebugTextViewHelper(player: ExoPlayer!, textView: TextView!)
```  

|                                                  Parameters                                                  |
|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `player: `[ExoPlayer](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ExoPlayer)`!` | The[ExoPlayer](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/ExoPlayer)from which debug information should be obtained. Only players which are accessed on the main thread are supported (` player.getApplicationLooper() == Looper.getMainLooper()`). |
| `textView: `[TextView](https://developer.android.com/reference/android/widget/TextView.html)`!`              | The[TextView](https://developer.android.com/reference/android/widget/TextView.html)that should be updated to display the information.                                                                                                                                             |

## Public functions

### start

```
fun start(): Unit
```

Starts periodic updates of the[TextView](https://developer.android.com/reference/android/widget/TextView.html). Must be called from the application's main thread.  

### stop

```
fun stop(): Unit
```

Stops periodic updates of the[TextView](https://developer.android.com/reference/android/widget/TextView.html). Must be called from the application's main thread.  

## Protected functions

### getAudioString

```
@UnstableApi
protected fun getAudioString(): String!
```

Returns a string containing audio debugging information.  

### getDebugString

```
@UnstableApi
protected fun getDebugString(): String!
```

Returns the debugging information string to be shown by the target[TextView](https://developer.android.com/reference/android/widget/TextView.html).  

### getPlayerStateString

```
@UnstableApi
protected fun getPlayerStateString(): String!
```

Returns a string containing player state debugging information.  

### getVideoString

```
@UnstableApi
protected fun getVideoString(): String!
```

Returns a string containing video debugging information.  

### updateAndPost

```
@UnstableApi
protected fun updateAndPost(): Unit
```