目录

class info
com.huawei.hms.mlplugin.card.gcr.MLGcrCapture.Callback
Represents the callback API of the general card recognition result.

Public Method Summary

Return typeMethod name
voidonCanceled()
voidonDenied()
voidonFailure(int retCode, android.graphics.Bitmap bitmap)
intonResult(MLGcrCaptureResult result, Object object)

Public Methods

Method
public void onCanceled()
The operation is canceled by the user.
Method
public void onDenied()
The camera is unavailable.
Method
public void onFailure(int retCode, android.graphics.Bitmap bitmap)
No text information is recognized or a system error occurs during recognition.

Parameters

Parameter nameParameter desc
retCodeResult code.
bitmapGeneral card image that fails to be recognized.
Method
public int onResult(MLGcrCaptureResult result, Object object)
Callback method called when the general card recognition result is obtained. If no text result is recognized, the onFailure method is called.

Parameters

Parameter nameParameter desc
resultRecognition result.
objectReserved field. This field can be null.


Return

Typedesc
intNotifies the plug-in of continuing or stopping recognition. CAPTURE_CONTINUE: Notifies the plug-in of continuing the recognition when the processing result does not meet the requirements. (This option is supported only in the camera stream mode.)CAPTURE_STOP: Notifies the plug-in of stopping the recognition and exiting when the processing result meets the requirements.