public interface ReviewFragmentListener
ReviewFragmentStandard
and ReviewFragmentCompat
to dispatch
events to the hosting Activity.Modifier and Type | Method and Description |
---|---|
void |
onDocumentReviewedAndAnalyzed(Document document)
Deprecated.
When a
GiniVision instance is available the document is analyzed
internally by using the configured GiniVisionNetworkService implementation. The
extractions will be returned in the Analysis Screen in
AnalysisFragmentListener#onExtractionsAvailable(Map, Map) . |
void |
onDocumentWasRotated(Document document,
int oldRotation,
int newRotation)
Deprecated.
When a
GiniVision and a GiniVisionNetworkService instance is
available rotation is handled internally. The document is analyzed by using the configured
GiniVisionNetworkService implementation. The extractions will be returned in the
Analysis Screen in AnalysisFragmentListener#onExtractionsAvailable(Map, Map) . |
void |
onError(GiniVisionError error)
Called when an error occurred.
|
void |
onExtractionsAvailable(java.util.Map extractions)
Deprecated.
When a
GiniVision instance is available the document is analyzed
internally by using the configured GiniVisionNetworkService implementation. The
extractions will be returned in the Analysis Screen in
AnalysisFragmentListener#onExtractionsAvailable(Map, Map) . |
void |
onProceedToAnalysisScreen(Document document)
Deprecated.
When a
GiniVision instance is available ReviewFragmentListener.onProceedToAnalysisScreen(Document,
String) is invoked instead. |
void |
onProceedToAnalysisScreen(Document document,
java.lang.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
|
void |
onProceedToNoExtractionsScreen(Document document)
Deprecated.
When a
GiniVision instance is available the document is analyzed
internally by using the configured GiniVisionNetworkService implementation. The
extractions will be returned in the Analysis Screen in
AnalysisFragmentListener#onExtractionsAvailable(Map, Map) . |
void |
onShouldAnalyzeDocument(Document document)
Deprecated.
When a
GiniVision instance is available the document is analyzed
internally by using the configured GiniVisionNetworkService implementation. The
extractions will be returned in the Analysis Screen in
AnalysisFragmentListener#onExtractionsAvailable(Map, Map) . |
@Deprecated void onShouldAnalyzeDocument(Document document)
GiniVision
instance is available the document is analyzed
internally by using the configured GiniVisionNetworkService
implementation. The
extractions will be returned in the Analysis Screen in
AnalysisFragmentListener#onExtractionsAvailable(Map, Map)
.We assume that in most cases the photo is good enough and this way we are able to provide analysis results quicker.
Note: Call ReviewFragmentStandard.onDocumentAnalyzed()
or ReviewFragmentCompat.onDocumentAnalyzed()
when the analysis is done and your Activity wasn't
stopped.
document
- contains the original image taken by the camera@Deprecated void onProceedToAnalysisScreen(Document document)
GiniVision
instance is available ReviewFragmentListener.onProceedToAnalysisScreen(Document,
String)
is invoked instead.ReviewFragmentStandard.onDocumentAnalyzed()
or ReviewFragmentCompat.onDocumentAnalyzed()
(or the image was changed) and the user tapped on
the Next button.
You should start your Activity extending AnalysisActivity
and set the document as
the AnalysisActivity.EXTRA_IN_DOCUMENT
extra.
document
- contains the reviewed image (can be the original one or a modified image)@Deprecated void onDocumentReviewedAndAnalyzed(Document document)
GiniVision
instance is available the document is analyzed
internally by using the configured GiniVisionNetworkService
implementation. The
extractions will be returned in the Analysis Screen in
AnalysisFragmentListener#onExtractionsAvailable(Map, Map)
.ReviewFragmentStandard.onDocumentAnalyzed()
or ReviewFragmentCompat.onDocumentAnalyzed()
and the image wasn't changed and the user tapped
on the Next button.
You should finish your Activity and proceed to handling the results of the analysis.
document
- contains the reviewed image (can be the original one or a modified image)@Deprecated void onDocumentWasRotated(Document document, int oldRotation, int newRotation)
GiniVision
and a GiniVisionNetworkService
instance is
available rotation is handled internally. The document is analyzed by using the configured
GiniVisionNetworkService
implementation. The extractions will be returned in the
Analysis Screen in AnalysisFragmentListener#onExtractionsAvailable(Map, Map)
.Called when the user rotated the image.
In case you started the document analysis in ReviewFragmentListener.onShouldAnalyzeDocument(Document)
you should cancel it here as the original image is not valid anymore.
document
- contains the modified imageoldRotation
- the previous rotation in degreesnewRotation
- the new rotation in degreesvoid onError(GiniVisionError error)
error
- details about what went wrong@Deprecated void onExtractionsAvailable(java.util.Map extractions)
GiniVision
instance is available the document is analyzed
internally by using the configured GiniVisionNetworkService
implementation. The
extractions will be returned in the Analysis Screen in
AnalysisFragmentListener#onExtractionsAvailable(Map, Map)
.extractions
- a map of the extractions with the extraction labels as keys@Deprecated void onProceedToNoExtractionsScreen(Document document)
GiniVision
instance is available the document is analyzed
internally by using the configured GiniVisionNetworkService
implementation. The
extractions will be returned in the Analysis Screen in
AnalysisFragmentListener#onExtractionsAvailable(Map, Map)
. You should show the NoResultsFragmentStandard
or NoResultsFragmentCompat
.
document
- contains the reviewed documentvoid onProceedToAnalysisScreen(Document document, java.lang.String errorMessage)
You should start your Activity extending AnalysisActivity
and set the document as
the AnalysisActivity.EXTRA_IN_DOCUMENT
extra.
document
- contains the reviewed image (can be the original one or a modified
image)errorMessage
- an optional error message to be passed to the Analysis Screen