Search code examples
androidandroid-studioandroid-camera2android-fileandroid-external-storage

How to save captured image from camera in android


The official sample of Camera2Basic for capturing images from camera.
It only shows the captured image in an activity but does not save the image to external storage

How to save that image to external storage?

I searched a lot over the internet for this, but there are all of the deprecated as of Android 11 (API 30).
Thanks!


Solution

  • use camerax lib from google which is part android jetpack