Is there an alternative to Kotlin Coroutines in Java? I have Kotlin code in which I want to perform facial recognition on one dispatcher, while updating the bounding boxes on the other. I tried to automatically convert the code to Java, but the coroutines part was not converted.
The code is something like this:
withContext( Dispatchers.Default ) {
//perform face recognition
}
withContext( Dispatchers.Main ) {
boundingBoxOverlay.faceBoundingBoxes = predictions
boundingBoxOverlay.invalidate()
isProcessing.set(false)
}