Biometric Authentication verification to any Android application
Gradle Dependecy
dependencies {
implementation 'com.github.thulasiram-sarathy:Fingerprint-Library:1.1'
}
allprojects {
repositories {
....
maven { url 'https://jitpack.io' }
}
}
#Kotlin
mBiometricManager = BiometricManager.BiometricBuilder(this@MainActivity)
.setTitle("Title")
.setScreen("Dialog position") // center || fullscreen || bottom
.setTitleBarText(false) // set true if titlebar recquired
.setSubtitle("Sub Title")
.setDescription("Description")
.setNegativeButtonText(Cancel)
.build()
mBiometricManager!!.authenticate(this@MainActivity)
#Java
new BiometricManager.BiometricBuilder(MainActivity.this)
.setTitle("Title")
.setScreen("center") // center || fullscreen || bottom
.setTitleBarText(false) // set true if titlebar recquired
.setSubtitle("Sub Title")
.setDescription("Description")
.setNegativeButtonText(Cancel)
.build()
.authenticate(biometricCallback);
#Attributes
SetScreen("center") || SetScreen("bottom") || SetScreen("fullscreen") -> For changing position of fingerprint dialog
setTitleBarText(false) -> false - Hide titlebar || true - show titlebar