Save image to internal storage using ActivityResultContracts.GetContent(). – (Kotlin/Java/Android)

All we need is a simple explanation of the problem, which is provided below. I’m new to file storage. My main goal is to take a picture with the camera, store it with good quality, then display it in an ImageView. I want to avoid asking for user permission (to use camera and external storage), … Read more

Android 12 (SDK > 29) Extra_Output for ACTION_IMAGE_CAPTURE not working

All we need is a simple explanation of the problem, which is provided below. I want to take a picture with the camera and then send it to another activity. Everything works on the emulator without any problems. But as soon as I try the app on my real device, I always get the status … Read more

Problem with binding camerax on android api 26

All we need is a simple explanation of the problem, which is provided below. I have such error: Use case binding failed No supported surface combination is found for camera device – Id : 1. May be attempting to bind too many use cases. Existing surfaces: [] New configs: [[email protected], [email protected], [email protected]] I think it … Read more

The camera displays a stretched image

All we need is a simple explanation of the problem, which is provided below. I have that code: final size = MediaQuery.of(context).size; final deviceRatio = size.width / size.height; return Align( alignment: Alignment.topCenter, child: AspectRatio( aspectRatio: deviceRatio, child: Stack( children: <Widget>[ CustomPaint( foregroundPainter: MeasureFaceOutline(isPosCorrect: true), child: Transform( alignment: Alignment.center, transform: Platform.isIOS ? Matrix4.rotationX(math.pi) : Matrix4.identity(), child: … Read more

How to use stock camera app to take photo with Jetpack Compose?

All we need is a simple explanation of the problem, which is provided below. In my app using Jetpack Compose, how can I use the existing stock photo app to take a picture and store it? Google’s documentation mentions the depreciated Camera API by using an Intent, but they’re using the old view system. And … Read more

Set view to be at bottom of camera preview?

All we need is a simple explanation of the problem, which is provided below. I’d like to set the position of the TextView to always be at the bottom of the camera preview. This is not the case with my layout below. When the user changes the aspect the ratio of the camera preview (ex: … Read more

Camera image from FileProvider Uri only displaying for first time

All we need is a simple explanation of the problem, which is provided below. My Jetpack Compose camera app is targeting API Level 32 and is being tested on an Android 11 phone. I’m generating a Uri with FileProvider to take a photo with the stock camera app. Logcat shows the Uri every time I … Read more

How it can be recognized that something touches the camera or finger is touched in android?

All we need is a simple explanation of the problem, which is provided below. I want to know how it can be recognized that something is taped to the Camera in Android? Any help please! Thanks Let’s Solve it: This is a common error many developers questioned us about it. So we write the explanation … Read more

Saving Camera Bitmap to Storage, and Setting Image with Bitmap

All we need is a simple explanation of the problem, which is provided below. I know the basics on how to take a picture and set it to ImageView. photo = (Bitmap) data.getExtras().get(“data”); imageView.setImageBitmap(photo); I want to do a little more than that. I am saving it to a folder on to an SD card. … Read more