<div class='type'>Function</div>


<a id='references'></a>


<h2 id="providecontent-content">provideContent</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
public suspend fun GlanceAppWidget.provideContent(
    content: @Composable @GlanceComposable () -> Unit
): Nothing
```


Provides `content` to the Glance host, suspending until the Glance session is shut down.

If this function is called concurrently with itself, the previous call will throw
`CancellationException` and the new content will replace it. This function should only be called
from `GlanceAppWidget.provideGlance`.

TODO: make this a protected member once b/206013293 is fixed.