ReviewFragmentListener

public interface ReviewFragmentListener

Interface used by ReviewFragmentStandard and ReviewFragmentCompat to dispatch events to the hosting Activity.

Functions

onDocumentReviewedAndAnalyzed
Link copied to clipboard
abstract void onDocumentReviewedAndAnalyzed(@NonNull() Document document)
Called if you called onDocumentAnalyzed or onDocumentAnalyzed and the image wasn't changed and the user tapped on the Next button.
onDocumentWasRotated
Link copied to clipboard
abstract void onDocumentWasRotated(@NonNull() Document document, int oldRotation, int newRotation)
Called when the user rotated the image.
onError
Link copied to clipboard
abstract void onError(@NonNull() GiniVisionError error)
Called when an error occurred.
onExtractionsAvailable
Link copied to clipboard
abstract void onExtractionsAvailable(@NonNull() Map<String, GiniVisionSpecificExtraction> extractions)
Called when the document has been analyzed and extractions are available.
onProceedToAnalysisScreen
Link copied to clipboard
abstract void onProceedToAnalysisScreen(@NonNull() Document document)
Called if you didn't call onDocumentAnalyzed or onDocumentAnalyzed (or the image was changed) and the user tapped on the Next button.
abstract void onProceedToAnalysisScreen(@NonNull() Document document, @Nullable() String errorMessage)
Called when the user tapped on the Next button and one of the following conditions apply:
  • Analysis is in progress
  • Analysis completed with an error
  • The image was rotated

    You should start your Activity extending AnalysisActivity and set the document as the EXTRA_IN_DOCUMENT extra.

onProceedToNoExtractionsScreen
Link copied to clipboard
abstract void onProceedToNoExtractionsScreen(@NonNull() Document document)
Called when the document has been analyzed and no extractions were received.
onShouldAnalyzeDocument
Link copied to clipboard
abstract void onShouldAnalyzeDocument(@NonNull() Document document)
Called when the Review Fragment was started and you should start analyzing the original document by sending it to the Gini API.

Inheritors

ReviewActivity
Link copied to clipboard