public ResultRepository<T>
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
@NotNull java.lang.Class<T> getAcceptedType()
Each result repository works with a single class.
@NotNull ResultWrapper<T> addResult(T result)
Allows to add a scanning result into the repository
result - result object which should be addedclass ResultWrapper containing the ResultId of the inserted result@Nullable
T getResult(@NotNull
java.lang.String resultId)
Returns the result for a given ResultId
resultId - id to find the result for@Nullable
T getResultAndErase(@NotNull
java.lang.String resultId)
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
void removeResult(@NotNull
java.lang.String resultId)
Removes the result with a given ResultId from the repository
resultId - id to delete the resultvoid clear()
Deletes all the results from the repository