The Document Capture Activity
Capturing a document image can be initiated by starting an activity with the following:
val docSession = Dockware.instance.startDocumentCaptureActivity(this)
lifecycleScope.launch {
docSession.documentCaptured.collect {
Log.d(TAG, "document image capture: $it")
}
}
To collect the parsed results for the document, use the session's documentsProcessed stateflow:
lifecycleScope.launch {
docSession.documentProcessed.collect {
Log.d(TAG, "document image processed: $it")
}
}
Bonus
You can use the startCaptureActivities() function to capture a document, then immediately capture a 3D object with a single CaptureActivities session that contains both the document and object capture data.