Comments (7)
I also do see this in the debugger: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=JobImpl{Cancelled}@d922855
@arvinkx good catch that was the exact issue. When a scope is created using CoroutineScope(coroutineContext)
function, it attaches the scope to a new Job
context. So when coroutineScope.cooutineContext.cancel()
is called it cancels the job and thus no more coroutines can be created using that scope.
from cameraview-ex.
Is this reproducible in the sampleApp provided with the library?
from cameraview-ex.
Not sure, can't get the sample app to compile. It complains that File google-services.json is missing. The Google Services Plugin cannot function without it.
Do I need to create a Firebase project in the console and download a google-services.json file to be able to run the sample app?
from cameraview-ex.
I had to include a google-services.json in order to compile it. I'm not sure why there is a need to have that in the project. @pvasa is that a dependency that could be removed? I also had to add gradle wrappers into a few sub projects.
from cameraview-ex.
I can confirm this issue exists in the sample app as well by leaving the app and coming back. Flash will fire but the picture is not taken and no preview is shown.
from cameraview-ex.
I had to include a google-services.json in order to compile it. I'm not sure why there is a need to have that in the project. @pvasa is that a dependency that could be removed? I also had to add gradle wrappers into a few sub projects.
@pcm2a @arvinkx The sampleApp demos barcode detection implementation using firebase api as a demo for preview frame listener that is why it requires google-services.json. Please refer this google help article for instructions on generating google-services.json
from cameraview-ex.
@pvasa Not really familiar with Kotlin but I believe the issue is related to this block of code in CameraView.kt
:
override fun onPictureTaken(imageData: ByteArray) {
coroutineScope.launch {
pictureTakenListeners.forEach {
it(imageData)
}
}
}
Once stop is called without removing the listeners, starting the camera again and calling capture in debug mode in the sample app, gets to the line with pictureTakenListeners
but doesn't call the block inside launch
when breakpoints are set. Hope this helps as I'm not really familiar enough with Kotlin to know why that block is not being called. I also do see this in the debugger: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=JobImpl{Cancelled}@d922855
from cameraview-ex.
Related Issues (20)
- in android 6.0 not working HOT 2
- Camera.isVideoRecording always returns false HOT 2
- hi? HOT 2
- error: expected enum but got (raw string) single_capture. HOT 2
- Caused by kotlin.UninitializedPropertyAccessException HOT 2
- UnsupportedOperationException No supported camera found for facing 1 HOT 2
- CameraCaptureSession: Session 1: Failed to create capture session; configuration failed HOT 2
- Samsung J7 prime issue in video recording, video recording stops just after starting. HOT 2
- no preview on pixel and samsung moblie HOT 2
- manual focus HOT 2
- Method markState must be called on the main thread HOT 5
- Preview is stretched for every aspect ratio if I use full screen CameraView HOT 2
- Front Faceing HOT 2
- expected enum but got (raw string) single_capture. HOT 2
- in android 6.0 not working HOT 2
- Method markState must be called on the main thread HOT 2
- Camera not working on Android 12 HOT 2
- Error when building APK HOT 2
- Android 11 and 12 I'm facing some issue HOT 2
- Unable to start video recording. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cameraview-ex.