---
title: "waitForReady"
description: "Returns a Job that can be used to wait until the session is ready (i.e."
type: "function"
lastmod: "2026-08-27"
---
## API Reference

### waitForReady

> Source set: Android

```kotlin
public suspend fun waitForReady(): Job
```

Returns a Job that can be used to wait until the session is ready (i.e. has finished
processEmittableTree for the first time and is now receiving events). You can wait on the
session to be ready by calling `Job.join` on the returned `Job`. When the session is ready,
join will resume successfully (Job is completed). If the session is closed before it is
ready, we call `Job.cancel` and the call to join resumes with `CancellationException`.
