invoke

suspend operator fun invoke(host: ReviewHost): ReviewOutcome(source)

Launches the review flow when the user is eligible.

The caller does not need to manage persisted session counts or prompt flags; both are updated inside this use case.

An eligible user on an install Play cannot serve — sideloaded, no Play Store, a debug build run from the IDE — gets ReviewOutcome.Unavailable rather than ReviewOutcome.Failed. The two say different things: one is a device that was never going to show a dialog, the other is a launch that should have worked and did not. The prompt flag stays unset either way, so the same user still gets their one prompt once Play can serve it.

The session count is recorded on every invocation, eligible or not, so call this once per app session. Calling it on every resume counts resumes instead, and the threshold stops meaning what it says.