目录

RemoteView.Builder

Class Info

public static class Builder

Utility class used to build RemoteView.

Public Method Summary

Qualifier and Type

Method Name and Description

RemoteView

build()

Customizes a barcode scanning view.

RemoteView.Builder

enableReturnBitmap()

Enables the function of returning the original image after successful scanning.

RemoteView.Builder

setBoundingBox(Rect rect)

Sets a bounding rectangle for the detected barcode.

RemoteView.Builder

setContext(Activity activity)

Sets an activity of a caller.

RemoteView.Builder

setContinuouslyScan(boolean continuouslyScan)

Sets whether to use continuous barcode scanning.

RemoteView.Builder

setFormat(int format, int… var2)

Sets barcode formats.

Public Methods

[h2]build

Method

public RemoteView build()

Customizes a barcode scanning view.

Returns

Type

Description

RemoteView

Customized barcode scanning view.

[h2]enableReturnBitmap

Method

public RemoteView.Builder enableReturnBitmap()

Enables the function of returning the original image after successful scanning.

NOTE:

After successful scanning, the original image will be returned with the HmsScan object if you call this method. If HmsScan is passed through Intent, the Intent upper limit may be exceeded. Therefore, you are advised to use static variables or save the image locally to pass the image URI.

Returns

Type

Description

RemoteView.Builder

Builder for RemoteView.

[h2]setBoundingBox

Method

public RemoteView.Builder setBoundingBox(Rect rect)

Sets a bounding rectangle for the detected barcode.

Parameters

Name

Description

rect

Barcode scanning bounding rectangle.

Returns

Type

Description

RemoteView.Builder

Builder for RemoteView.

[h2]setContext

Method

public RemoteView.Builder setContext(Activity activity)

Sets an activity of a caller.

Parameters

Name

Description

activity

Activity of a caller.

Returns

Type

Description

RemoteView.Builder

Builder for RemoteView.

[h2]setContinuouslyScan

Method

public RemoteView.Builder setContinuouslyScan(boolean continuouslyScan)

Sets whether to use continuous barcode scanning.

Parameters

Name

Description

continuouslyScan

Indicates whether to use continuous barcode scanning. The default value is true.

Returns

Type

Description

RemoteView.Builder

Builder for RemoteView.

[h2]setFormat

Method

public RemoteView.Builder setFormat(int format, int... var2)

Sets barcode formats.

Parameters

Name

Description

format

Supported barcode format. For details, please refer to HmsScan.

var2

List of supported barcode formats. This parameter is optional.

Returns

Type

Description

RemoteView.Builder

Builder for RemoteView.