If your issue is related to observed behavior, rather than API usage, please include information about the specific device (even if the device is an emulator).
Questions tagged [android-camerax]
807 questions
-1
votes
1 answer
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): Int {
val notification = createNotification()
…

ahmad yamani
- 3
- 1
- 2
-1
votes
1 answer
How to track for how long specific item was detected via Android MLKit object detection?
I'm working on specific app that detect items via MLKit (Android),detection works great, but what would be most optimal way to track for how long specific items was detected.
Like if I detect certain item I want to track how long it was detected for…

Vaclovas Rekašius Jr.
- 401
- 5
- 16
-1
votes
1 answer
CameraX using Java (android studio)
Here is an image screenshot App screenshot
Can anyone help me with a working repo or link to a working version of camera x with use case selector preview and image capture?
I’ve traced the problem to the image capture and I think it has something to…

Aezikel
- 23
- 4
-1
votes
1 answer
Having trouble saving images to a public directory [Kotlin]
So I hope the title makes sense but heres more context .
I want to make my own camera app and I am following this Google Practice for cameraX. I have got the camera working on my physical phone but the problem is I cant view my images that I have…

Crimson Space
- 1
- 9
-1
votes
1 answer
Unresolved refrence: requireLensFacing | Android Studio
I am getting 'Unresolved reference: requireLensFacing' for CameraSelector.Builder.requireLensFacing(lensFacing).build()
I have added camera core dependencies and I can actually open up the CameraSelector class and find the 'requireLensFacing' method…

Dev Tyagi
- 19
- 4
-1
votes
1 answer
Problem with the android.permission.CAMERA failure
I'm trying to implement the CameraX preview from the [Android developer site][1] I don't know why I'm getting this error even when I added the permissions in my manifests. When I open the QR scanner activity the preview is just black screen. I have…

Pragya Kulshresth
- 313
- 4
- 8
-1
votes
1 answer
How to get CameraPreview by AndroidView
I create the CameraPreview in layout resource file, and i want to show this file in AndroidView by clicking the navigation icon button .
// navigation icon button
Icon(
vectorResource(id = R.drawable.ic_photo),
modifier =…

ccd
- 5,788
- 10
- 46
- 96
-1
votes
1 answer
How to get bitmap stream from camera using CameraX?
I have no idea how to get bitmap stream using CameraX. Please provide me some information. I have no idea how to do that.

Hello World
- 740
- 5
- 18
-1
votes
2 answers
Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath
I'm trying out the new CameraX, have followed the instructions mentioned here https://developer.android.com/jetpack/androidx/releases/camera#camera-camera2-1.0.0-alpha07. And I get the following error,
e: Supertypes of the following classes cannot…

Sivakumar S
- 681
- 5
- 19
-1
votes
1 answer
Translating Kotlin algorithm into Java code
Im pretty new at programming and i am struggling to implement the cameraX analyzer https://codelabs.developers.google.com/codelabs/camerax-getting-started/#7 .
Can someone help convert this line of code val pixels = data.map { it.toInt() and 0xFF }…

jeanluc rotolo
- 165
- 1
- 11
-1
votes
1 answer
Facebase MLKit face detection failed with front camera when using CameraX
I am trying to implement face detection using Firebase MLKit and CameraX ImageAnalysis. It works fine when using back camera, but when i tried with front camera, it detected nothing:
val config = PreviewConfig.Builder()
…

kimwii
- 81
- 1
- 7