build.gradle
add the Dyneti Maven repository (credentials provided during integration):build.gradle
add the dependency:Application
class add the following line to init DyScan
.uses-feature
tags in its AndroidManifest.xml
file to filter out devices that don't support the required camera features. This filtering affects the host app's supported device count in Google Play.AndroidManifest.xml
manifest tag section:AndroidManifest.xml,
you should additionally check manually if the device is supported before calling DyScan functions to avoid a bad user experience (see below).onClick
handler in the layout XML via android:onClick="onScanPress"
. (If not, the process is analogous, just use the code inside this function). onScanPress
is implemented asonActivityResult()
to get the scan result.CreditCard
class contains fields String cardNumber
, int expiryMonth
, int expiryYear
, and boolean isFraud
. Note that isFraud
is currently always set to false, and expiryYear
is the full four-digit year.EXTRA_HELPER_TEXT_STRING
EXTRA_LANGUAGE
.EXTRA_LANGUAGE
EXTRA_HELPER_TEXT_COLOR
Color.WHITE
EXTRA_HELPER_TEXT_SIZE_SP
sp
unit.18
EXTRA_HELPER_TEXT_FONT_FAMILY
EXTRA_SHOW_HELPER_TEXT
true
EXTRA_SHOW_CORNERS
true
EXTRA_CORNER_THICKNESS
15f
EXTRA_CORNER_INACTIVE_COLOR
Color.GRAY
EXTRA_CORNER_ACTIVE_COLOR
Color.CYAN
EXTRA_CORNER_COMPLETED_COLOR
Color.GREEN
EXTRA_BACKGROUND_COLOR
Color.GRAY
EXTRA_BACKGROUND_OPACITY
115
EXTRA_SHOW_ROTATE_BUTTON
false
EXTRA_SHOW_MANUAL_ENTRY_BUTTON
false
EXTRA_MANUAL_ENTRY_STRING
EXTRA_SHOW_RESULT_OVERLAY
false
EXTRA_RESULT_OVERLAY_ALWAYS_HORIZONTAL
false
EXTRA_SHOW_DYNETI_LOGO
true
EXTRA_SHOW_CARD_OVERLAY
true