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 https://play.google.com/store/apps/details?id=com.vibe.britevibe

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

Recommended from Medium

How to Prep for the AWS DevOps Professional Certification in 2020

TDD — What is it?

Spectre & Meltdown in the Cloud

Hackathon Series | Deconstructing ARIA

30 Excel shortcut keys that make Excel user friendly | Learn Excel Shortcut Keys in Details |…

AWS and Azure Roles

Let's give it a Trie!

Docker Basics & Dockerised RHEL8

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 https://play.google.com/store/apps/details?id=com.vibe.britevibe

More from Medium

Requesting Multiple Permissions in Jetpack Compose…

How to create Gradient Button using JetPack Compose

Koin Framework — Qualifiers(Part-6) — Most Underrated Framework🤔

Trying to upload an API level 29 and play store console throws an error?