Skip to content

Instantly share code, notes, and snippets.

@yektasarioglu
Last active January 5, 2021 08:52
Show Gist options
  • Save yektasarioglu/bab75b1625afdaa49b5c29cdeae24909 to your computer and use it in GitHub Desktop.
Save yektasarioglu/bab75b1625afdaa49b5c29cdeae24909 to your computer and use it in GitHub Desktop.
var resultAction: ((SparseArray<MLText.Block?>) -> Unit)? = null
override fun transactResult(results: MLAnalyzer.Result<MLText.Block?>) {
val items = results.analyseList
// Determine detection result processing as required. Note that only the detection results are processed.
// Other detection-related APIs provided by ML Kit cannot be called.
resultAction?.invoke(items)
resultAction = null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment