Skip to content

Commit 5461ded

Browse files
authored
Update README.md
1 parent 47ecf11 commit 5461ded

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,10 @@ public class MyActivity extends AppCompatActivity {
9898
if (requestCode == REQUEST_CODE_ID_CAPTURE && resultCode == RESULT_OK && data != null) {
9999
// Extract the ID capture result from the data intent
100100
IDDocument document = data.getParcelable(IDCaptureActivity.EXTRA_ID_DOCUMENT);
101-
if (document == null) {
101+
if (document == null || document.getFaceBounds() == null) {
102102
return;
103103
}
104104
Uri imageUri = document.getImageUri();
105-
VerIDFace face = document.getFace();
106105
if (imageUri == null || face == null) {
107106
return;
108107
}
@@ -113,7 +112,7 @@ public class MyActivity extends AppCompatActivity {
113112
114113
// Get the bounds of the face detected on the ID card
115114
Rect faceBounds = new Rect();
116-
face.getBoundingBox().round(faceBounds);
115+
document.getFaceBounds().round(faceBounds);
117116
// Load the image of the front of the card
118117
InputStream inputStream = getContentResolver().openInputStream(imageUri);
119118
try {

0 commit comments

Comments
 (0)