Closed babaoye closed 2 years ago
Android API level?
android { compileSdk 32
lintOptions {
disable 'RestrictedApi'
}
defaultConfig {
applicationId "com.em.ef"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments += [
"room.schemaLocation":"$projectDir/schemas".toString(),
"room.incremental":"true",
"room.expandProjection":"true"]
}
}
}
Here's your problem: minSdk 21
From the tutorial:
On Android, SourceAFIS requires Android API level 24+ (tested with SourceAFIS 3.14.2).
hello please am getting my image from a url how possible to match??
url="myapi/biometrics/" + biometerics + ".JPEG"; Bitmap bitmap = Glide .with(FtrScanDemoUsbHostActivity.this) .asBitmap() .load(url) .diskCacheStrategy(DiskCacheStrategy.NONE) .skipMemoryCache(true) .centerCrop() .submit() .get(); ByteArrayOutputStream stream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream); byte[] byteArray = stream.toByteArray(); FingerprintTemplate probe = new FingerprintTemplate().dpi(500).create(byteArray);
File extStorageDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); mDir = new File(extStorageDirectory,"Mypath/Biometrics/"+mybiometrics+".JPEG"); Bitmap myBitmap = BitmapFactory.decodeFile(mDir.getAbsolutePath()); ByteArrayOutputStream stream2 = new ByteArrayOutputStream(); myBitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream2); byte[] byteArray2 = stream2.toByteArray();
but when i want to compile my apk i get a warning of this
com.android.tools.r8.internal.YI0: One or more instruction is preventing default interface method from being desugared: java.lang.Double it.unimi.dsi.fastutil.objects.Reference2DoubleMap.getOrDefault(java.lang.Object, java.lang.Double)
can anyone help with a better way of doing this using the New Api Method Call Points that is
FingerprintTemplate probe = new FingerprintTemplate( new FingerprintImage( Files.readAllBytes(Paths.get("probe.png")), new FingerprintImageOptions() .dpi(500)));