Questions tagged [android-camera]

The Android framework includes support for various cameras and camera features available on devices, allowing you to capture pictures and videos in your applications.

android-camera
Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

Why is android invalidating a valid file when data is saved to it

I am trying to store a camera image to a temporary file to be used in a network task. I successfully create the file and pass the Uri into the activity. However, when the camera image is taken, a ...
RandomLonelyDev's user avatar
0 votes
1 answer
514 views

Android FileProvider.getUriForFile Failed to find configured root

The issue is when I call getTmpFileUri() I get something like this: java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.sample.myapp/cache/...
jilbot's user avatar
  • 93
4 votes
4 answers
808 views

Can we change camera zoom point in flutter?

I work on a Flutter app in which I use camera plugin. I want to zoom in to an arbitrary point (offset) of the camera preview, for example to the top-left corner of the screen and then take a photo of ...
sm_sayedi's user avatar
  • 621
0 votes
0 answers
420 views

View Manager Error during going back React Native Vision Camera

When users clicks a button, i am navigating user to new screen. In the new screen a camera opens by using react native vision camera. But when i am pressing back buttons "View Manager for tag&...
Tanvir Rahman's user avatar
1 vote
1 answer
3k views

Ionic app - android problem with access to photo gallery

I'm creating some ionic capacitor app and I have problem with new Android phones. I have a screen with some button that allows user to set his profile picture. When user clicks button for the first ...
hvma411's user avatar
  • 359
-1 votes
1 answer
47 views

Flutter Shows path error on take picture function

I write some code to take picture and saved in getTemporaryDirectory() path variable but wheni initalize the path on _cameraController.takePicture(path); it shows me error of Too many positional ...
Anuj Verma's user avatar
2 votes
0 answers
617 views

Dart/Flutter: camera take low and high res picture at same time or fast convert?

I am making a camera app, that stores the pictures to my azure storage acount and lets the user interact with the pictures. I want to have a ResolutionPreset.ultraHigh and a ResolutionPreset.low ...
Lukas Fürst's user avatar
1 vote
3 answers
1k views

React Native Can't Prompt pop-up to get Permission to get Camera Permission

My code is: const handleButtonPress = async () => { try { const granted = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.CAMERA, { title: 'Camera ...
Francis.C's user avatar
0 votes
0 answers
203 views

CameraX RuntimeException lock buffer failed for format 0x21

We recently implemented CameraX to take images instead of using the device camera. Since the time we rolled out this feature in our app, we are seeing the following error. Can someone help debug this ...
android_eng's user avatar
  • 1,380
0 votes
1 answer
78 views

Android - getSupportedPreviewSizes only returns Landscape sizes

I am trying to build a Live feature similar to Instagram Live. And I want to open the camera preview full screen in portrait mode. I am using the below to set the size of the preview of the camera. ...
APIS's user avatar
  • 138
0 votes
1 answer
251 views

Turn on torch when camera is open

I need to turn on torch when camera is open. class FlashLight(private val context: Context) { private val cameraManager by lazy { context.getSystemService(Context.CAMERA_SERVICE) as CameraManager }...
Wafi_ck's user avatar
  • 1,238
4 votes
1 answer
2k views

ActivityResultContracts TakePicture it is always returning false as a result

I'm using Jetpack Compose, and when I call the method to take a picture with the camera, the result of ActivityResultContracts.TakePicture is always false. Sample code: @OptIn(...
Assis's user avatar
  • 43
1 vote
0 answers
108 views

Use native document picture scanner from the web

I am building a web application that needs to have document scanner functionalities. I made some research to do that fully with web technologies but it seems that it's a bit too complicated for what I ...
user1780729's user avatar
0 votes
1 answer
451 views

How can I add timer in CameraX preview after pressing the Start video recording button?

My requirement is that I have to built a video recording app using Android JAVA in which user will save his 30 seconds of video which will be sent to the another server. User will use the video ...
Anshul's user avatar
  • 51
1 vote
1 answer
395 views

ESP32-CAM buffer

When I initialize the camera I use this: #include "esp_camera.h" bool initCamera(){ Serial.print("Iniciando Cámara ..."); camera_config_t config; config.ledc_channel = ...
Mendira's user avatar
  • 13
0 votes
1 answer
1k views

react native android ask camera permission when user first logs in

I'm not familiar with the react-native app permissions for android and ios. I'm in thihs project which needs camera and audio permissions for videocalls that are already implemented and work fine. The ...
alexgarciaalcuadrado's user avatar
1 vote
0 answers
108 views

How to obtain screen aspect ratio unaugmented camera image in an ARCore application?

I'm working on an augmented reality application based on ARCore. I'd need to capture the screen to perform some extra manipulation, which wouldn't be a real time manipulation so it won't be in the ...
Csaba Toth's user avatar
  • 10.3k
1 vote
1 answer
1k views

How can I request camera permission in Android Studio new version

I want to get camera permission in Android, but when I used this code, it didn't work. It shows me an error. Can you please help me solve this problem or you can show the code I can use to get this ...
Shahriar Sakib's user avatar
2 votes
1 answer
3k views

How do some apps can access ultra wide lens camera when Camera2 API doesn't even return all cameras?

So I have different Samsung devices (up to S22 Ultra) and it is very easy to access ultra wide lens camera because CameraManager.cameraIdList returns 4 cameras which includes general back lens camera ...
user924's user avatar
  • 10.4k
1 vote
1 answer
624 views

Camera X android landscape orientation for preview

I have implemented a Camera X preview which handle both portrait an landscape orientation. Basics google params are good for portrait mode, but when I'm rotating my device the preview in landscape ...
nicover 's user avatar
  • 2,368
0 votes
1 answer
33 views

how to get size of my image file store in DIRECTORY_Picture

I am implementing an app using camera to capture photo . But the camera is capturing even if i don't click , and saving it in the Picture Directory . Photos captured without clicking are saved in hte ...
Patrick Renaud's user avatar
1 vote
2 answers
3k views

Flutter camera issue in android version 13

In Android 13 we are facing the below issue we are using this third-party camera plugin (https://pub.dev/packages/camera), I would really appreciate the help to solve the issue, Do we need to make ...
sumit_patel's user avatar
1 vote
1 answer
59 views

Resgistering photos issues in android programming

I am implementing an android app using camera to take pictures then registering it in External_storage\Android\data\com.abc.projectname.bf . But after openning the camera , even if i don't capture , ...
Patrick Renaud's user avatar
0 votes
1 answer
201 views

Record Video while doing Image processing through CameraX in Android

I am doing image processing by using CameraX, it is working fine. I want to record video too while doing image processing. Is it possible? If yes then how? I am doing image processing as: ...
Faizan Ahmad's user avatar
1 vote
1 answer
119 views

Store full-size images using a FileProvider

I want to save an image in its full size. I use a file provider for this. I can take the picture, but I don't get any data in the onActivityResult function. The intent is null. What am I doing wrong? ...
Captai-N's user avatar
  • 1,362
-1 votes
1 answer
216 views

Running CameraX in a service in Android Studio with Kotlin

i want to create a class in Android Studio using Kotlin that runs Camera in background class MyForegroundService : Service() { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): ...
ahmad yamani's user avatar
0 votes
1 answer
419 views

WebView in react-native-webview: camera not working

import React from "react"; import { WebView } from "react-native-webview"; import { StyleSheet } from "react-native"; export default function HealthCheck({ route }) { ...
Rnwck's user avatar
  • 33
1 vote
1 answer
275 views

IOException: write failed: EINVAL (Invalid argument) on UVC FileOutputStream in Kotlin

I'm trying to write Android Camera stream frames to the UVC Buffer using FileOutputStream. For context: the UVC Driver is working on the device and it has a custom built kernel. I get 24 frames per ...
Filip Luchianenco's user avatar
0 votes
1 answer
335 views

Find focal length in flutter

We're building an Obstacle Detection System for visually impared person using mobile camera for college project. I've made a simple camera app. How to find the focal length of android camera in this ...
Riwash Neupane's user avatar
0 votes
1 answer
67 views

In my app I can't transfer the picture I took from the Camera to the app

I made an automobile management application. I made a vehicle image adding system in the application. When the Image is selected I want to upload it to firebase and view it. When I select a picture ...
Sezer Ercan's user avatar
0 votes
1 answer
2k views

Is it possible to create mobile app in streamlit

I am trying to create mobile app in streamlit but I have no idea how to do that could someone help me to create streamlit mobile app by giving example In mobile app we should take pictures and crop ...
Keerthi 's user avatar
0 votes
0 answers
381 views

React native RN Camera crachs onTextRecognized

I am trying to get(read) text in image. Fot this I am using "react-native-camera": "^4.2.1", Whenever I open camera it works fine. But when I add this line into code App craches ...
jawad zahoor's user avatar
0 votes
0 answers
125 views

Images captured using CameraX are larger compared to images captured using Camera1

We are working on updating our legacy Camera application to use CameraX APIs instead of Camera1 APIs. We have used same camera configurations in both Camera1 and CameraX, we read the JPEG image byte ...
arun's user avatar
  • 323
1 vote
1 answer
3k views

Handling Camera Permission Result - Flutter

I am using below method to check whether Camera permission is granted or not: //Global variable int cameraPermission = -1; Future<void> checkCameraPermission() async { cameraPermissionStatus = ...
Jaimin Modi's user avatar
  • 1,620
1 vote
1 answer
729 views

Camera intent Android return null [duplicate]

Start Intent Code : Intent takePictureIntent = new Intent(); takePictureIntent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, imageUri); takePictureIntent.setAction(MediaStore.ACTION_IMAGE_CAPTURE)...
Anthony Rafael's user avatar
1 vote
1 answer
411 views

How can I use ARCore with CameraX?

I know ARCore using Camera2 by default. I was wondering about how we can use it with CameraX? Is any way to use ARCore with CameraX? I just tried shared session ARCore samples, It's using Camera2 API. ...
Dev007's user avatar
  • 377
1 vote
0 answers
50 views

Why does my Android Tablet not Report Focal length or Sensor width?

So this is something that's been blocking us for a while now. For context, we're trying to use Google's MediaPipe library on an Android tablet. However, it crashes complaining about a Null array ...
ObjectNameDisplay's user avatar
2 votes
0 answers
781 views

Recording a video with MediaStore.ACTION_VIDEO_CAPTURE fails on Android 13

When I'm trying to Record a video with MediaStore.ACTION_VIDEO_CAPTURE on Android 13, the app crashes. java.lang.NullPointerException: Attempt to invoke virtual method 'void android.content....
Lev T.'s user avatar
  • 31
0 votes
0 answers
50 views

Recent API information on opening a camera in Android Studio (Kotlin)

This might come off as a weird post, because I don't directly want answers to how to fix this just yet. Over the past few weeks now I've been searching for good tutorials/information on opening the ...
shaunsnj's user avatar
1 vote
1 answer
357 views

Android CameraX: how to get AF status associated with an analysis ImageProxy

I'm new to CameraX, coming from Camera2 With Camera2, when CameraCaptureSession.CaptureCallback.onCaptureCompleted is called, we get an instance of TotalCaptureResult which contains many useful ...
ant1's user avatar
  • 21
0 votes
0 answers
35 views

How to make output video landscape mode when recording video in portrait mode?

For some reason, I want video has fixed resolution in landscape whether i recorded in portrait mode or landscape mode. like this picture: Picture I try mediaRecorder.setVideoSize(640,480) to set fixed ...
Vũ Thao's user avatar
0 votes
0 answers
518 views

Image quality is very low after capture with camera in jetpack compose

I am making this camera app where I take the picture and upload to server. But after captured image that I am getting very low quality. Can we specify the image quality here? val cameraLauncher = ...
Jeevan Rupacha's user avatar
3 votes
1 answer
2k views

Flutter Camera Exception - CameraDevice was already closed

I have a flutter app that has a feature to record a video and save it to a file using camera: ^0.10.0+4. The scenario is after the user finishes recording on VideoRecordPage, he press continue button ...
Ahmed Yusuf's user avatar
0 votes
1 answer
113 views

process image from camera when pressing take a photo button (circle)?

I did code for processing the image from camera and it works fine, After capturing the image (clicking on take a picture button) it is asking for click ok in camera and then it starts processing image,...
Alokin's user avatar
  • 9
1 vote
2 answers
944 views

How to stop camera from working when it no longer visible in the compisition?

I've got a bottomSheetScaffold, which contains a BottomSheet That BottomSheet uses device's Camera, where I use CameraX alongside with Google's MLkit for bar scanning Let's consider permission is ...
devMohaned's user avatar
1 vote
1 answer
959 views

CrossMedia.Current.TakePhotoAsync crashes on Android Phone after taking and Saving Picture. It works well on Android Emulator

When I debug my solution in the android emulator, I can successfully take a picture with the CrossMedia.Current.TakePhotoAsync and it doesn't crash after taking the picture and tapping on the "...
Md Idiake's user avatar
1 vote
0 answers
203 views

How to filter out devices on Google Play with Legacy Camera Hardware Level

When using Camera2 API or CameraX I get such crashes for and also With Camera 2 API you can check the camera hardware level: val level = getCameraCharacteristics( context, ...
user924's user avatar
  • 10.4k
0 votes
0 answers
516 views

How to Integrate external Camera device to Android

Requirement:- I have to make a android accessibility service application which take camera frames through any USB Camera Device. Camera should be always turn on. Try to use camera2 Api to connect ...
Nripender Kumar's user avatar
0 votes
0 answers
200 views

i want to getSavedUri() of saved video file

i have made a simple camera application using cameraX api to record 10 sec video. app is working fine it records 10 sec video and save it into internal mobile storage but i want to get absolute path ...
Hassaan Zahid's user avatar
1 vote
0 answers
146 views

Android Camera2 API autofocus (AF) state remains in ACTIVE SCAN state

I'm stuck at the problem that after locking the android autofocus (AF) the AF state will change into AF_STATE_ACTIVE_SCAN and remain in that state forever. Restarting the AF trigger by cancel it and ...
AWSi-TS's user avatar
  • 11