ActivityResultCallerKt

Added in 1.2.0

public final class ActivityResultCallerKt


Summary

Public methods

static final @NonNull ActivityResultLauncher<Unit>
<I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultCaller receiver,
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull I input,
    @NonNull Function1<@NonNull O, Unit> callback
)

A version of ActivityResultCaller.registerForActivityResult that additionally takes an input right away, producing a launcher that doesn't take any additional input when called.

static final @NonNull ActivityResultLauncher<Unit>
<I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultCaller receiver,
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull I input,
    @NonNull ActivityResultRegistry registry,
    @NonNull Function1<@NonNull O, Unit> callback
)

A version of ActivityResultCaller.registerForActivityResult that additionally takes an input right away, producing a launcher that doesn't take any additional input when called.

Public methods

registerForActivityResult

public static final @NonNull ActivityResultLauncher<Unit> <I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultCaller receiver,
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull I input,
    @NonNull Function1<@NonNull O, Unit> callback
)

A version of ActivityResultCaller.registerForActivityResult that additionally takes an input right away, producing a launcher that doesn't take any additional input when called.

registerForActivityResult

public static final @NonNull ActivityResultLauncher<Unit> <I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultCaller receiver,
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull I input,
    @NonNull ActivityResultRegistry registry,
    @NonNull Function1<@NonNull O, Unit> callback
)

A version of ActivityResultCaller.registerForActivityResult that additionally takes an input right away, producing a launcher that doesn't take any additional input when called.