The Object Scanner Activity
Starting an activity that captures 3D data of objects can be done with the following:
val session = Dockware.instance.startObjectCaptureActivity(
context = this@MainActivity,
collectProcessedResults = true
)
The session object this function returns contains a few StateFlow properties, one of which can be collected to get the raw capture data:
lifecycleScope.launch {
session.capturesRaw.collect {
Log.d(TAG, "session raw captures: $it")
}
}
If collectProcessedResults is set to true when starting this activity, a capturesProcessed StateFlow will also be updated with the processed capture data, such as dimensions, as it become available:
lifecycleScope.launch {
session.capturesProcessed.collect {
Log.d(TAG, "session processed captures: $it")
}
}