This PR adds missed scanned functionality into Android RN module.
This is means scanCard method would be resolved with scanned: boolean field.
It was implemented just for iOS only before.
List of changes
while preparing Android Intent for presenting CardIOActivity the CardIOActivity.EXTRA_RETURN_CARD_IMAGE with value true was added to request return card image in onActivityResult within Intent data
check for CardIOActivity.EXTRA_CAPTURED_CARD_IMAGE in onActivityResult from received Intent data to understand whether this card was scanned or fully entered manually
readme update (removed "iOS only" labels from the scanned field)
Additional notes
The idea of providing this feature for Android was taken from this native Android SDK issue. Ideally it should be determined using this EXTRA_MANUAL_ENTRY_RESULT extra value, but unfortunately this thing is private I don't have an access to change this, since this react-native-awesome-card-io packages calls the binary under the hood and it's not possible to modify or patch it AFAIK.
What this PR is about?
This PR adds missed
scanned
functionality into Android RN module. This is meansscanCard
method would be resolved withscanned: boolean
field. It was implemented just for iOS only before.List of changes
Intent
for presentingCardIOActivity
theCardIOActivity.EXTRA_RETURN_CARD_IMAGE
with valuetrue
was added to request return card image inonActivityResult
withinIntent data
CardIOActivity.EXTRA_CAPTURED_CARD_IMAGE
inonActivityResult
from receivedIntent data
to understand whether this card was scanned or fully entered manually"iOS only"
labels from thescanned
field)Additional notes
The idea of providing this feature for Android was taken from this native Android SDK issue. Ideally it should be determined using this
EXTRA_MANUAL_ENTRY_RESULT
extra value, but unfortunately this thing is private I don't have an access to change this, since thisreact-native-awesome-card-io
packages calls the binary under the hood and it's not possible to modify or patch it AFAIK.