question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CameraXBasic imageCapture.takePicture does not return any callback on my android 10 emulator

See original GitHub issue

I used CameraXBasic in my production app for more than several months, everything was fine until 2 or 3 weeks ago takePicture function stopped returning any callback. I tried to update version and many different ways to implement CameraXBasic on my app, but it doesn’t return any callback anymore. Both onError and onImageSaved are not returned.

imageCapture.takePicture(outputOptions, cameraExecutor, object : ImageCapture.OnImageSavedCallback {
                    override fun onError(exc: ImageCaptureException) {
                        Log.e(TAG, "Photo capture failed: ${exc.message}", exc)
                    }

                    override fun onImageSaved(output: ImageCapture.OutputFileResults) {
                    })

Tried versions: def camerax_version = ‘1.0.0-beta08’ def camerax_version = “1.0.0-beta10” def camerax_version = “1.0.0-alpha04”

It seems it doesn’t work on many other Android 10 devices either, but works well on Android 9.

I also downloaded CameraXBasic sample app, launched on Emulator and I can’t get any response callback there either.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
owahltinezcommented, Oct 2, 2020

Have you tried using the unmodified sample?

0reactions
owahltinezcommented, Nov 8, 2020

This was an emulator issue, it should be fixed now. Please update Android Studio and your emulator to the latest version and this issue should go away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google CameraXBasic stopped working on android 10?
I tried to update version and many different ways to implement CameraXBasic on my app, but it doesn't return any callback anymore. Both...
Read more >
CameraX imageCapture.takePicture function is not working on ...
Tested in lower android versions like 9, 10 and 11 it works. Android 12, it doesnt work. imageCapture.takePicture(ContextCompat.getMainExecutor( ...
Read more >
ImageCapture takePicture onCaptureSuccess never called
When calling to take a picture with the image capture use case ... but the resulting image capture is never returned for callback...
Read more >
Image capture - Android Developers
The image capture use case is designed for capturing high-resolution, ... The callback executor is the parameter of the takePicture methods.
Read more >
How to Make Your Own Android Camera App without ...
I am kind of an advocate of learning by doing so I decided to put up a tutorial for any Android beginners looking...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found