目录

class info
com.huawei.hms.mlplugin.card.bcr.MLBcrCaptureConfig.Factory
Represents the configurator factory of the bank card recognition plug-in, which is used to create a configurator instance for the bank card recognition plug-in.

Public Method Summary

Return typeMethod name
MLBcrCaptureConfigcreate()
MLBcrCaptureConfig.FactorysetOrientation(int orientation)

Public Methods

Method
public MLBcrCaptureConfig create()
Creates a configurator instance for the bank card recognition plug-in, and specifies the expected result type of bank card recognition.

Return

Typedesc
MLBcrCaptureConfigConfigurator instance of the bank card recognition plug-in.

Sample Code

  1. MLBcrCaptureConfig config = new MLBcrCaptureConfig.Factory()
  2.     // Set the recognition screen orientation.
  3.     // MLBcrCaptureConfig.ORIENTATION_AUTO: adaptive mode. The physical sensor decides the plug-in screen orientation.
  4.     // MLBcrCaptureConfig.ORIENTATION_LANDSCAPE: landscape mode. The screen width is greater than the screen height.
  5.     // MLBcrCaptureConfig.ORIENTATION_PORTRAIT: portrait mode. The screen height is greater than the screen width.
  6.     .setOrientation(MLBcrCaptureConfig.ORIENTATION_AUTO)
  7.     .create();
Method
public MLBcrCaptureConfig.Factory setOrientation(int orientation)
Sets the recognition screen orientation.

Parameters

Parameter nameParameter desc
orientationRecognition screen orientation.
ORIENTATION_AUTO: adaptive mode
ORIENTATION_LANDSCAPE: landscape mode
ORIENTATION_PORTRAIT: portrait mode

Return

Typedesc
MLBcrCaptureConfig.FactoryFactory instance of the bank card recognition plug-in configurator.