ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with `directCameraLaunch`

The latest release of ImagePickerKMP (v1.0.23) brings a small but
powerful addition for iOS developers: a new flag called
directCameraLaunch.

This feature gives you control over whether the image picker should
open directly into the camera or show the…


This content originally appeared on DEV Community and was authored by Ismoy Belizaire

The latest release of ImagePickerKMP (v1.0.23) brings a small but
powerful addition for iOS developers: a new flag called
directCameraLaunch.

This feature gives you control over whether the image picker should
open directly into the camera or show the source selection
dialog
first.

The New Flag: directCameraLaunch

By default, the picker shows a dialog on iOS asking the user to choose
between camera and gallery.\
With directCameraLaunch, you can now change that behavior:

  • directCameraLaunch = true → Skips the dialog and opens the camera immediately.\
  • directCameraLaunch = false → Keeps the dialog so the user can choose.

Usage Example

Here's how you can use it with ImagePickerLauncher in your Compose
Multiplatform project:

    ImagePickerLauncher(
        config = ImagePickerConfig(
            onPhotoCaptured = { result ->
                capturedPhoto = result
                showCamera = false
            },
            onError = {
                showCamera = false
            },
            onDismiss = {
                showImagePicker = false // Reset state when user doesn't select anything
            },
            directCameraLaunch = false // Set to true if you want to launch the camera directly Only IOS
        )
    )

Why This Matters

This new option provides better UX flexibility:

  • Apps that want a streamlined flow (e.g., scanning receipts, IDs, QR codes) can go straight to the camera.\
  • Apps that want to offer both gallery and camera selection can keep the dialog.

In short: you now have the best of both worlds, controlled with a simple
flag.

Dependency

To try it out, update your Gradle dependency to the latest version:

dependencies {
    implementation("io.github.ismoy:imagepickerkmp:1.0.23")
}

Final Thoughts

The directCameraLaunch flag makes ImagePickerKMP even more versatile
for real-world use cases. Whether your app prioritizes fast camera
access or user choice, you can now support both seamlessly with version
1.0.23.

Are you planning to use directCameraLaunch in your project? Would you
prefer the dialog or direct camera launch by default?

Github: https://github.com/ismoy/ImagePickerKMP


This content originally appeared on DEV Community and was authored by Ismoy Belizaire


Print Share Comment Cite Upload Translate Updates
APA

Ismoy Belizaire | Sciencx (2025-09-03T11:51:36+00:00) ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with `directCameraLaunch`. Retrieved from https://www.scien.cx/2025/09/03/imagepickerkmp-1-0-23-controling-camera-launch-on-ios-with-directcameralaunch/

MLA
" » ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with `directCameraLaunch`." Ismoy Belizaire | Sciencx - Wednesday September 3, 2025, https://www.scien.cx/2025/09/03/imagepickerkmp-1-0-23-controling-camera-launch-on-ios-with-directcameralaunch/
HARVARD
Ismoy Belizaire | Sciencx Wednesday September 3, 2025 » ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with `directCameraLaunch`., viewed ,<https://www.scien.cx/2025/09/03/imagepickerkmp-1-0-23-controling-camera-launch-on-ios-with-directcameralaunch/>
VANCOUVER
Ismoy Belizaire | Sciencx - » ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with `directCameraLaunch`. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/09/03/imagepickerkmp-1-0-23-controling-camera-launch-on-ios-with-directcameralaunch/
CHICAGO
" » ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with `directCameraLaunch`." Ismoy Belizaire | Sciencx - Accessed . https://www.scien.cx/2025/09/03/imagepickerkmp-1-0-23-controling-camera-launch-on-ios-with-directcameralaunch/
IEEE
" » ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with `directCameraLaunch`." Ismoy Belizaire | Sciencx [Online]. Available: https://www.scien.cx/2025/09/03/imagepickerkmp-1-0-23-controling-camera-launch-on-ios-with-directcameralaunch/. [Accessed: ]
rf:citation
» ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with `directCameraLaunch` | Ismoy Belizaire | Sciencx | https://www.scien.cx/2025/09/03/imagepickerkmp-1-0-23-controling-camera-launch-on-ios-with-directcameralaunch/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.