目录

HmsScanFrameOptions.Creator

Class Info

public static class Creator

Internal Creator class used for creating HmsScanFrameOptions.

Public Method Summary

Qualifier and Type

Method Name and Description

HmsScanFrameOptions

create()

Creates an HmsScanFrameOptions instance.

HmsScanFrameOptions.Creator

setHmsScanTypes(int format, int… otherFormats)

Sets barcode formats.

HmsScanFrameOptions.Creator

setMultiMode(boolean multiMode)

Sets the decoding mode.

HmsScanFrameOptions.Creator

setParseResult(boolean paseResult)

Sets whether to parse the scanning result.

HmsScanFrameOptions.Creator

setPhotoMode(boolean photoMode)

Sets whether to enable image mode or camera mode for barcode scanning.

Public Methods

[h2]create

Method

public HmsScanFrameOptions create()

Creates an HmsScanFrameOptions instance.

Returns

Type

Description

HmsScanFrameOptions

HmsScanFrameOptions instance.

[h2]setHmsScanTypes

Method

public HmsScanFrameOptions.Creator setHmsScanTypes(int format, int… otherFormats)

Sets supported barcode formats.

Parameters

Name

Description

format

Barcode format.

otherFormats

Barcode format.

Returns

Type

Description

HmsScanFrameOptions.Creator

HmsScanFrameOptions.Creator instance.

[h2]setMultiMode

Method

public HmsScanFrameOptions.Creator setMultiMode(boolean multiMode)

Sets the decoding mode.

Parameters

Name

Description

multiMode

Decoding mode.

  • true: multi-barcode mode
  • false (default): single barcode mode

Returns

Type

Description

HmsScanFrameOptions.Creator

HmsScanFrameOptions.Creator instance.

[h2]setParseResult

Method

public HmsScanFrameOptions.Creator setParseResult(boolean parseResult)

Sets whether to parse the scanning result.

Parameters

Name

Description

parseResult

Whether to parse the scanning result.

  • true (default): yes
  • false: no. In this case, the format of the recognized barcode will be returned in text via getScanType().

Returns

Type

Description

HmsScanFrameOptions.Creator

HmsScanFrameOptions.Creator instance.

[h2]setPhotoMode

Method

public HmsScanFrameOptions.Creator setPhotoMode(boolean photoMode)

Sets whether to enable image mode or camera mode for barcode scanning.

Parameters

Name

Description

photoMode

Whether to enable image mode or camera mode for barcode scanning.

  • true: image mode
  • false (default): camera mode

Returns

Type

Description

HmsScanFrameOptions.Creator

HmsScanFrameOptions.Creator instance.