SpreeAITryOnContract

An ActivityResultContract for launching the Spree AI virtual try-on flow.

This contract defines the necessary inputs (SpreeAITryOn.TryOn) to start the SpreeAIActivity and parses the output into a structured SpreeAITryOn.Result. It's used internally by rememberSpreeAITryOn and the SpreeAITryOn constructors to handle the activity lifecycle in a type-safe manner.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun createIntent(context: Context, input: SpreeAITryOn.TryOn): Intent

Creates an Intent to launch the SpreeAIActivity.

Link copied to clipboard
open override fun parseResult(resultCode: Int, intent: Intent?): SpreeAITryOn.Result

Parses the result from the SpreeAIActivity into a SpreeAITryOn.Result.