-
Notifications
You must be signed in to change notification settings - Fork 22
API Integration Documentation For Android
Nichole Martinez edited this page Dec 9, 2022
·
1 revision
This documentation is intended to guide how to integrate smartscanner core in to your android project
*Note : *
Before proceeding make sure you have already perform this https://github.com/newlogic/smartscanner-core/wiki/Building-from-source (TODO maven repo)
- create an intent w/ SmartScannerActivity
- prepare ScannerOptions
- then launch ActivityForResult
val intent = Intent(this, SmartScannerActivity::class.java)
val scannerOptions = ScannerOptions(
mode = Modes.QRCODE.value,
language = Language.EN,
qrCodeOptions = QRcodeOptions(isJson = true),
config = Config(
branding = true,
imageResultType = ImageResultType.PATH.value,
label = "testing",
isManualCapture = false,
orientation = Orientation.PORTRAIT.value
)
)
intent.putExtra("scanner_options", scannerOptions)
- Handle result and get intent extra eg.
val result = intent.getStringExtra(SCANNER_RESULT)
val rawResult = intent.getStringExtra(SCANNER_RAW_RESULT)
QR Scanner Result REFERENCES :
-
SmartActivity.SCANNER_RAW_RESULT
// [String] Raw content from the QR Code scanner -
SmartActivity.SCANNER_RESULT
// [String] A Json encoded result from JWT -
SmartActivity.SCANNER_FAIL_RESULT
// [String] the fail text message -
SmartActivity.SCANNER_SIGNATURE_VERIFICATION
// [Boolean] JWT is verified or not -
SmartActivity.SCANNER_JWT_CONFIG_UPDATE
// [Boolean] JWT payload is for config update -
SmartActivity.SCANNER_HEADER_RESULT
// [String] A header result after getting result from JWT
TODO barcoder scanner
TODO PDF417 scanner
TODO IDPASS scanner
TODO MRZ scanner
TODO E-passport/ID scanner