Closed andrewreeman closed 2 years ago
@andrewreeman Was looking over this PR because it pertains to an issue we are experiencing with the library. However, I don't see any commits from you in the PR, just commits from @dwillmc. Are you sure you pushed your branch for review properly?
@andrewreeman I'd also recommend reverting back to 1.0.0-beta3.10 if possible. The issue described in #508 has been a problem for a while but it is worse in 1.0.0-beta3.11 as explained here: https://github.com/CameraKit/camerakit-android/issues/508#issuecomment-531372066
As mentioned in the GlobalScope documentation the use for GlobalScope should really be limited to application level.
When using 1.0.0-beta3.11 we experienced issues with photo capture due to the global scope. Changing this to using a local scope fixed this us.
This commit removes the other two instances of global scope (possibly fixing #508 ?). It's worth noting that
GlobalScope.launch
was removed from CameraPreview.capturePhoto. I believe it should not cause a problem if instead of removing it if we replaced it with:runBlocking { launch(cameraDispatcher) { ...capture photo... } }
It's worth noting that I am not an experienced Kotlin developer so perhaps I could have misunderstood something.