Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
hilpitome committed Oct 9, 2023
2 parents a36accd + dc7df08 commit c872e14
Show file tree
Hide file tree
Showing 3 changed files with 395 additions and 236 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,14 @@ protected void addOnBarCodeResultListeners(final Context context, final Material
if (context instanceof JsonApi) {
JsonApi jsonApi = (JsonApi) context;
jsonApi.addOnActivityResultListener(JsonFormConstants.BARCODE_CONSTANTS.BARCODE_REQUEST_CODE,
new OnActivityResultListener() {
@Override
public void onActivityResult(int requestCode,
int resultCode, Intent data) {
if (requestCode == JsonFormConstants.BARCODE_CONSTANTS.BARCODE_REQUEST_CODE && resultCode == RESULT_OK) {
if (data != null) {
Barcode barcode = data.getParcelableExtra(JsonFormConstants.BARCODE_CONSTANTS.BARCODE_KEY);
Timber.d("Scanned QR Code %s ", barcode.displayValue);
editText.setText(barcode.displayValue);
} else
Timber.i("NO RESULT FOR QR CODE");
}
(requestCode, resultCode, data) -> {
if (requestCode == JsonFormConstants.BARCODE_CONSTANTS.BARCODE_REQUEST_CODE && resultCode == RESULT_OK) {
if (data != null) {
Barcode barcode = data.getParcelableExtra(JsonFormConstants.BARCODE_CONSTANTS.BARCODE_KEY);
Timber.d("Scanned QR Code %s ", barcode.displayValue);
editText.setText(barcode.displayValue);
} else
Timber.i("NO RESULT FOR QR CODE");
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,17 @@ private void addFingerprintResultsListener(final Context context, final ImageVie
if (context instanceof JsonApi) {
JsonApi jsonApi = (JsonApi) context;
jsonApi.addOnActivityResultListener(JsonFormConstants.ACTIVITY_REQUEST_CODE.REQUEST_CODE_REGISTER,
new OnActivityResultListener() {
@Override
public void onActivityResult(int requestCode,
int resultCode, Intent data) {
if (requestCode == JsonFormConstants.ACTIVITY_REQUEST_CODE.REQUEST_CODE_REGISTER && resultCode == RESULT_OK) {
if (data != null) {

SimPrintsRegistration registration = (SimPrintsRegistration) data.getSerializableExtra(SimPrintsConstantHelper.INTENT_DATA);
imageView.setTag(R.id.simprints_guid, registration.getGuid());
setFingerprintDrawable(context, imageView, registration.getGuid(), true);
Timber.d("Scanned Fingerprint GUID %s ", registration.getGuid());
} else {
Timber.i("NO RESULT FOR FINGERPRINT");
setFingerprintDrawable(context, imageView, "", true);
}
(requestCode, resultCode, data) -> {
if (requestCode == JsonFormConstants.ACTIVITY_REQUEST_CODE.REQUEST_CODE_REGISTER && resultCode == RESULT_OK) {
if (data != null) {

SimPrintsRegistration registration = (SimPrintsRegistration) data.getSerializableExtra(SimPrintsConstantHelper.INTENT_DATA);
imageView.setTag(R.id.simprints_guid, registration.getGuid());
setFingerprintDrawable(context, imageView, registration.getGuid(), true);
Timber.d("Scanned Fingerprint GUID %s ", registration.getGuid());
} else {
Timber.i("NO RESULT FOR FINGERPRINT");
setFingerprintDrawable(context, imageView, "", true);
}
}
});
Expand Down
Loading

0 comments on commit c872e14

Please sign in to comment.