How to implement camera Capture and save Image using Jetpack compose

For this we need to implement camerax in our app level gradle file

Followed by our permission implementation

regarding permission you can check my previous post on

Now lets start with getting permission

here permissionstate will be used if you want to trigger single permission for mutliple permission you can use rememberMultiplePermissionsState and you can listOf all your permission inside. Currently i am using singlee permission that is CAMERA so i passed my camera permission inside rememberPermissionState on Button onclick i triggered the permission.Another thing is add prmission on manifest file

So we are done with permission part lets see how we start camera.First i am going to use Box scope for designing what is Box Scope its similar to FrameLayout in XML we can place over that layout iniside that i am creating Androidview ny using AndroidView takes a viewblock it s provided with context so we dont need to use Context

In the above you can see code with Camerax.

Final Code

CamerOpen Composable

Knowledge is everything.Check out my app at

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Optimize Your Warehouse with Warehouse Management Software

Octopus Network Community Event Recap 09.11.21

My Goals And Achievement For HNG-8 Internship


8 Tips to Help Scale and Manage Your Engineering Team — Dashlane Blog

A piratical approach to Kernel PCA

Solving the Office Problems of 2017 through Document Management

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pandiyan Mani

Pandiyan Mani

Knowledge is everything.Check out my app at

More from Medium

How to create Gradient Button using JetPack Compose

Kotlin — Basics 🪁 — Part 2

Kotlin Annotation with use-site targets on Jackson

Advantages of Jetpack Compose

why jetpack compose