public static class ScanTrustCameraManager.Builder extends Object
Modifier and Type | Field and Description |
---|---|
protected Activity |
activity |
protected CropType |
cropType |
protected float |
desiredZoom |
protected boolean |
isQa |
protected ScanTrustCameraManager.ManagerCallback |
managerCallback |
protected CameraApiVersion |
requiredCameraApi |
protected boolean |
requireDetailedContent |
protected boolean |
startWithTorchOn |
protected boolean |
startZoomedOut |
Constructor and Description |
---|
Builder(Activity activity,
ScanTrustCameraManager.ManagerCallback managerCallback) |
Modifier and Type | Method and Description |
---|---|
ScanTrustCameraManager |
build()
Builds a manager which uses the best camera api for the phone.
|
ScanTrustCameraManager.Builder |
cropType(CropType ct)
Defines the type of crop to perform on the scan(fingerprint or QR code)
The default is fingerprint.
|
ScanTrustCameraManager.Builder |
detailedContent(boolean details)
Deprecated.
|
ScanTrustCameraManager.Builder |
imposeCameraApi(CameraApiVersion cameraApiVersion)
Enforces the use of the given Camera Api.
|
ScanTrustCameraManager.Builder |
isQa(boolean qa)
Defines if the manager is used in a QA app or not.
|
ScanTrustCameraManager.Builder |
setDesiredZoom(float desiredZoom)
Don't use unless you know what you are doing.
Defines the desire zoomed-in level. |
ScanTrustCameraManager.Builder |
startWithTorchOn(boolean torch)
Defines if the camera starts with the torch on or not
|
ScanTrustCameraManager.Builder |
startZoomedOut(boolean zoom)
Defines if the camera starts zoomed out or not.
|
protected final Activity activity
protected final ScanTrustCameraManager.ManagerCallback managerCallback
protected CropType cropType
protected boolean isQa
protected boolean startZoomedOut
protected boolean requireDetailedContent
protected float desiredZoom
protected CameraApiVersion requiredCameraApi
protected boolean startWithTorchOn
public Builder(Activity activity, ScanTrustCameraManager.ManagerCallback managerCallback)
public ScanTrustCameraManager.Builder cropType(CropType ct)
ct
- the crop typeScanTrustCameraManager.Builder
public ScanTrustCameraManager.Builder isQa(boolean qa)
qa
- true if the context of the scan is the printing quality assuranceScanTrustCameraManager.Builder
public ScanTrustCameraManager.Builder startZoomedOut(boolean zoom)
Default: true --> zoomed out
zoom
- true to start zoomed outScanTrustCameraManager.Builder
@Deprecated public ScanTrustCameraManager.Builder detailedContent(boolean details)
public ScanTrustCameraManager.Builder startWithTorchOn(boolean torch)
Default: false --> starts turned off
torch
- true to start with the torch onScanTrustCameraManager.Builder
public ScanTrustCameraManager.Builder setDesiredZoom(float desiredZoom)
desiredZoom
- the desired zoomed-in level. Acceptable values: [1-4]ScanTrustCameraManager.Builder
public ScanTrustCameraManager.Builder imposeCameraApi(CameraApiVersion cameraApiVersion)
CameraApiVersion.NONE
which will result in the manager being chosen automaticallycameraApiVersion
- the required api versionpublic ScanTrustCameraManager build() throws CameraAccessException
ScanTrustCameraManager
CameraAccessException
- if something went wrong with the camera setup.