Skip to content

Commit

Permalink
Merge branch 'master' into optbp-compression-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
SebaMutuku authored Sep 15, 2023
2 parents d854552 + f8c80cf commit dc7df08
Show file tree
Hide file tree
Showing 4 changed files with 396 additions and 237 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 dc7df08

Please sign in to comment.