Getting the results
The onResults parameter returns an
OCRResponse``
data class OCRResponse(
val documentImages: Map<String, Bitmap>,
val documentText: Map<String, String>
)
Core dependencies
The following dependencies might be needed if facing any challenges
def compose_version = "1.2.0"
implementation("androidx.compose.ui:ui:$compose_version")
// Tooling support (Previews, etc.)
implementation("androidx.compose.ui:ui-tooling:$compose_version")
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
implementation("androidx.compose.foundation:foundation:$compose_version")
// Material Design
implementation("androidx.compose.material:material:$compose_version")
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.0"