public interface AnalysisFragmentInterface
Methods which both Analysis Fragments must implement.
Modifier and Type | Method and Description |
---|---|
void |
hideError()
Call this method to hide the error shown before with
AnalysisFragmentInterface.showError(String, String, View.OnClickListener) or
AnalysisFragmentInterface.showError(String, int) . |
void |
onDocumentAnalyzed()
Deprecated.
When a
GiniVision instance is available the document
is analyzed internally by using the configured GiniVisionNetworkService
implementation. The extractions will be returned in AnalysisFragmentListener.onExtractionsAvailable(Map) . |
void |
onNoExtractionsFound()
Deprecated.
When a
GiniVision instance is available the document
is analyzed internally by using the configured GiniVisionNetworkService
implementation. |
void |
setListener(AnalysisFragmentListener listener)
Set a listener for analysis events.
|
void |
showError(java.lang.String message,
int duration)
Call this method when you need to show an error message to the user in the Analysis
Screen.
|
void |
showError(java.lang.String message,
java.lang.String buttonTitle,
View.OnClickListener onClickListener)
Call this method when you need to show an error message with an invokable action to the user
in the Analysis Screen.
|
void |
startScanAnimation()
Deprecated.
When a
GiniVision instance is available the document
is analyzed internally by using the configured GiniVisionNetworkService
implementation. The extractions will be returned in AnalysisFragmentListener.onExtractionsAvailable(Map) . |
void |
stopScanAnimation()
Deprecated.
When a
GiniVision instance is available the document
is analyzed internally by using the configured GiniVisionNetworkService
implementation. The extractions will be returned in AnalysisFragmentListener.onExtractionsAvailable(Map) . |
void hideError()
Call this method to hide the error shown before with
AnalysisFragmentInterface.showError(String, String, View.OnClickListener)
or
AnalysisFragmentInterface.showError(String, int)
.
@Deprecated void onNoExtractionsFound()
GiniVision
instance is available the document
is analyzed internally by using the configured GiniVisionNetworkService
implementation.You should call this method after you've received the analysis results from the Gini API without the required extractions.
@Deprecated void onDocumentAnalyzed()
GiniVision
instance is available the document
is analyzed internally by using the configured GiniVisionNetworkService
implementation. The extractions will be returned in AnalysisFragmentListener.onExtractionsAvailable(Map)
.You should call this method after you've received the analysis results from the Gini API.
void showError(java.lang.String message, int duration)
Call this method when you need to show an error message to the user in the Analysis Screen.
message
- a short error messageduration
- how long should the error message be shown in msvoid showError(java.lang.String message, java.lang.String buttonTitle, View.OnClickListener onClickListener)
Call this method when you need to show an error message with an invokable action to the user in the Analysis Screen.
message
- a short error messagebuttonTitle
- if not null and not empty, shows a button with the given titleonClickListener
- listener for the button@Deprecated void startScanAnimation()
GiniVision
instance is available the document
is analyzed internally by using the configured GiniVisionNetworkService
implementation. The extractions will be returned in AnalysisFragmentListener.onExtractionsAvailable(Map)
.You should call this method when you start the document analysis using the Gini API.
@Deprecated void stopScanAnimation()
GiniVision
instance is available the document
is analyzed internally by using the configured GiniVisionNetworkService
implementation. The extractions will be returned in AnalysisFragmentListener.onExtractionsAvailable(Map)
.You should call this method when the document analysis has finished.
void setListener(AnalysisFragmentListener listener)
Set a listener for analysis events.
By default the hosting Activity is expected to implement
the AnalysisFragmentListener
. In case that is not feasible you may set the
listener using this method.
Note: the listener is expected to be available until the fragment is attached to an activity. Make sure to set the listener before that.
listener
- AnalysisFragmentListener
instance