Offline Biometric instrumentation is the process of adding SeeTest's fingerprint mocking capabilities to the app in the app build process, as opposed to adding those libraries in the import process.
Mock Source Code
The jar of source code can be acquired by contacting Experitest support.
Instrumenting Biometric libraries:
To instrumenting the biometric libs, we should make the following changes in the Android application source code -
Add fingerprint-mock.jar to your app build.gradle
- replace "android.hardware.fingerprint.FingerprintManager" to "com.mock.FingerprintManager"
- replace "android.hardware.fingerprint.FingerprintFactory" to "com.mock.FingerprintFactory"
- If getting the FingerPrintManager service as - getSystemService(FingerprintManager.class) replace to FingerprintFactory.getInstance(<context>).
- "android.security.keystore.KeyGenParameterSpec.Builder" should be replaced by "com.mock.KeyGenParameterSpec.Builder".
Register the fingerprint broadcast receiver in the application's AndroidManifest as -
We may encounter some unexpected errors in the application codebase, such as -
- java.lang.BootstrapMethodError: Exception from call site #2 bootstrap method - This may be because the application does not have JAVA_1_8 source compatibility.