public interface CameraFragmentListener
Interface used by CameraFragmentStandard
and CameraFragmentCompat
to dispatch events to the hosting Activity.
Modifier and Type | Interface and Description |
---|---|
static interface |
CameraFragmentListener.DocumentCheckResultCallback
Callback to inform the Gini Vision Library about the outcome of the custom imported document checks.
|
Modifier and Type | Method and Description |
---|---|
void |
onCheckImportedDocument(Document document,
CameraFragmentListener.DocumentCheckResultCallback callback)
This method is invoked for imported documents to allow custom validations.
|
void |
onDocumentAvailable(Document document)
Called when the user has taken an image with the camera or has imported a document that passed the Gini Vision Library's validation and any custom checks that were implemented.
|
void |
onError(GiniVisionError error)
Called when an error occurred.
|
void |
onExtractionsAvailable(java.util.Map extractions)
Called after a QRCode was successfully analyzed.
|
void |
onProceedToMultiPageReviewScreen(GiniVisionMultiPageDocument multiPageDocument) |
void |
onQRCodeAvailable(QRCodeDocument qrCodeDocument)
Deprecated.
When a
GiniVision instance is available the QRCode
is analyzed internally by using the configured GiniVisionNetworkService
implementation. The extractions will be returned in CameraFragmentListener.onExtractionsAvailable(Map) . |
void onDocumentAvailable(Document document)
Called when the user has taken an image with the camera or has imported a document that passed the Gini Vision Library's validation and any custom checks that were implemented.
document
- the image taken by the camera or the validated imported documentvoid onProceedToMultiPageReviewScreen(GiniVisionMultiPageDocument multiPageDocument)
@Deprecated void onQRCodeAvailable(QRCodeDocument qrCodeDocument)
GiniVision
instance is available the QRCode
is analyzed internally by using the configured GiniVisionNetworkService
implementation. The extractions will be returned in CameraFragmentListener.onExtractionsAvailable(Map)
.
Called when the user clicked the QR Code detected popup.
You should upload the QRCodeDocument
's data to the Gini API to get the extractions,
close the Gini Vision Library and continue to your app's transfer form.
See QRCodeDocument
for supported formats.
qrCodeDocument
- contains payment data from a QR Codevoid onCheckImportedDocument(Document document, CameraFragmentListener.DocumentCheckResultCallback callback)
This method is invoked for imported documents to allow custom validations.
Invoke one of the CameraFragmentListener.DocumentCheckResultCallback
methods on the main thread to inform the Gini Vision Library about the result.
Note: The Gini Vision Library will wait until one of the CameraFragmentListener.DocumentCheckResultCallback
methods are invoked.
document
- a Document
created from the file the user pickedcallback
- use this callback to inform the Gini Vision Library about the result of the custom checksvoid onError(GiniVisionError error)
Called when an error occurred.
error
- details about what went wrongvoid onExtractionsAvailable(java.util.Map extractions)
extractions
- a map of the extractions with the extraction labels as keys