---
title: "provideContent"
description: "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."
type: "function"
---

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


<a id='references'></a>
<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.



