Package 

Class CaptureMediaLauncherKt

    • Method Summary

      Modifier and Type Method Description
      final static ManagedActivityResultLauncher<Unit, File> rememberCaptureMediaLauncher(CaptureMediaContract.Mode mode, Function1<File, Unit> onResult) Creates and remembers a launcher for capturing media (photo and/or video) using the device camera.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • rememberCaptureMediaLauncher

        @Composable() final static ManagedActivityResultLauncher<Unit, File> rememberCaptureMediaLauncher(CaptureMediaContract.Mode mode, Function1<File, Unit> onResult)

        Creates and remembers a launcher for capturing media (photo and/or video) using the device camera.

        The contract's destination file paths are persisted via rememberSaveable so that captured media can be recovered after process death (e.g. "Don't keep activities").

        Parameters:
        mode - The capture mode determining what media types can be captured.
        onResult - Callback invoked when media capture completes successfully.