Class ScanbotBarcodeScannerSDKInitializer
-
- All Implemented Interfaces:
public final class ScanbotBarcodeScannerSDKInitializer
Initializes Scanbot SDK library. Use it to set up desired components and then call .initialize. Can be initialized only once.
-
-
Constructor Summary
Constructors Constructor Description ScanbotBarcodeScannerSDKInitializer()
-
Method Summary
Modifier and Type Method Description final ScanbotBarcodeScannerSDKInitializer
withLogging(Boolean useLog, Boolean enableNativeLogging)
Enables or disables logs in Scanbot Barcode Scanner SDK. final ScanbotBarcodeScannerSDKInitializer
license(Application application, String license)
Set Scanbot Barcode Scanner SDK license final ScanbotBarcodeScannerSDKInitializer
licenceErrorHandler(IScanbotSDKLicenseErrorHandler licenseErrorHandler)
Register callback for handling all sdk license errors after sdk initialisation final ScanbotBarcodeScannerSDKInitializer
allowXnnpackAcceleration(Boolean enable)
Enables/disables XNNPACK acceleration for TensorFlow ML models, which provides highly optimized implementations of floating-point neural network operators. final ScanbotBarcodeScannerSDKInitializer
allowGpuAcceleration(Boolean enable)
Enables/disables GPU acceleration for TensorFlow ML models final ScanbotBarcodeScannerSDKInitializer
precompileGpuMlModels(Function0<Unit> precompilingCallback)
Performs GPU ML models precompiling final SdkLicenseInfo
initialize(Application application)
Initializes Scanbot Barcode Scanner SDK library final ScanbotBarcodeScannerSDKInitializer
sdkFilesDirectory(Application application, File sdkFilesDirectory)
Set the custom directory for pages and documents storage final ScanbotBarcodeScannerSDKInitializer
useFileEncryption(Boolean enableFileEncryption, FileIOProcessor fileIOProcessor)
Sets a global Scanbot Barcode Scanner SDK flag which enables/disables a usage of encrypted file IO processor for all image and pdf files. final ScanbotBarcodeScannerSDKInitializer
useCameraXRtuUi(Boolean enable)
Controls whether the new Camera X based View will be used in Ready to Use UI components. final ScanbotBarcodeScannerSDKInitializer
pdfImagesExtractorType(PdfImagesExtractor.Type type)
Set Scanbot SDK to use the specified io.scanbot.sdk.pdf.PdfImagesExtractor.TypeDefault is io.scanbot.sdk.pdf.PdfImagesExtractor.Type.ANDROID_PDF_WRITER. final ScanbotBarcodeScannerSDKInitializer
logger(Logger logger)
Adjust this parameter to specify which Logger should be used. final static Boolean
isInitialized()
-
-
Method Detail
-
withLogging
final ScanbotBarcodeScannerSDKInitializer withLogging(Boolean useLog, Boolean enableNativeLogging)
Enables or disables logs in Scanbot Barcode Scanner SDK.
Logs are printed into LogCat as well as saved on the device. You can find them in Environment.getExternalStorageDirectory/debug_logs/package_name. Usually it is /sdcard/debug_logs/package_name
By default all logs are disabled. If you're using logging, consider switching it off for production builds for security and performance reasons.
This method must be called before .initialize, so it is possible to change logging settings before initializing the SDK.
- Parameters:
useLog
-true
to enable loggingfalse
to disable loggingenableNativeLogging
- settrue
if logging in C++ native core should be enabled, otherwise -false
.
-
license
final ScanbotBarcodeScannerSDKInitializer license(Application application, String license)
Set Scanbot Barcode Scanner SDK license
-
licenceErrorHandler
final ScanbotBarcodeScannerSDKInitializer licenceErrorHandler(IScanbotSDKLicenseErrorHandler licenseErrorHandler)
Register callback for handling all sdk license errors after sdk initialisation
-
allowXnnpackAcceleration
final ScanbotBarcodeScannerSDKInitializer allowXnnpackAcceleration(Boolean enable)
Enables/disables XNNPACK acceleration for TensorFlow ML models, which provides highly optimized implementations of floating-point neural network operators.
-
allowGpuAcceleration
final ScanbotBarcodeScannerSDKInitializer allowGpuAcceleration(Boolean enable)
Enables/disables GPU acceleration for TensorFlow ML models
-
precompileGpuMlModels
final ScanbotBarcodeScannerSDKInitializer precompileGpuMlModels(Function0<Unit> precompilingCallback)
Performs GPU ML models precompiling
- Parameters:
precompilingCallback
- this callback will be triggered when GPU ML models compilation will be completed
-
initialize
final SdkLicenseInfo initialize(Application application)
Initializes Scanbot Barcode Scanner SDK library
-
sdkFilesDirectory
final ScanbotBarcodeScannerSDKInitializer sdkFilesDirectory(Application application, File sdkFilesDirectory)
Set the custom directory for pages and documents storage
-
useFileEncryption
final ScanbotBarcodeScannerSDKInitializer useFileEncryption(Boolean enableFileEncryption, FileIOProcessor fileIOProcessor)
Sets a global Scanbot Barcode Scanner SDK flag which enables/disables a usage of encrypted file IO processor for all image and pdf files. By default - false.
-
useCameraXRtuUi
final ScanbotBarcodeScannerSDKInitializer useCameraXRtuUi(Boolean enable)
Controls whether the new Camera X based View will be used in Ready to Use UI components. True by default
-
pdfImagesExtractorType
final ScanbotBarcodeScannerSDKInitializer pdfImagesExtractorType(PdfImagesExtractor.Type type)
Set Scanbot SDK to use the specified io.scanbot.sdk.pdf.PdfImagesExtractor.Type
Default is io.scanbot.sdk.pdf.PdfImagesExtractor.Type.ANDROID_PDF_WRITER.
Use io.scanbot.sdk.barcode_scanner.ScanbotBarcodeScannerSDK.createPdfImagesExtractor to get an instance of io.scanbot.sdk.pdf.PdfImagesExtractor
-
logger
final ScanbotBarcodeScannerSDKInitializer logger(Logger logger)
Adjust this parameter to specify which Logger should be used. To set a custom logger ScanbotBarcodeScannerSDKInitializer.withLogging must be set to
true
- Parameters:
logger
- implementation of Logger
-
isInitialized
final static Boolean isInitialized()
-
-
-
-