DocumentRepository

Provides access to the scanning result of the given type by ResultId The current implementation of the repository keeps the result only in RAM and does not store anything on the persistent storage It is important to persist the data manually if it is needed to be used after the restart of the process of the application Be careful when processing the intent with ResultId in onCreate method of the Activity as it may be recreated after the termination of the process

Constructors

Link copied to clipboard
constructor(storage: ResultStorage<Document>)

Properties

Link copied to clipboard
open override val acceptedType: Class<Document>

Each result repository works with a single class.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun addResult(result: Document): ResultWrapper<Document>

Allows to add a scanning result into the repository

Link copied to clipboard
open override fun clear()

Deletes all the results from the repository

Link copied to clipboard
open override fun getResult(resultId: ResultId): Document?

Returns the result for a given ResultId

Link copied to clipboard
open override fun getResultAndErase(resultId: ResultId): Document?

Returns the result for a given ResultId and delete it from the repository Use this method if you just need to process the result after the successful recognition to keep the usage of memory low

Link copied to clipboard
open override fun removeResult(resultId: ResultId)

Removes the result with a given ResultId from the repository