A robust and easy-to-integrate solution for face verification within Android applications
Advanced face detection and verification in real-time using ML Kit
Beautiful UI components built with Jetpack Compose and Material Design 3
Robust security features and reliable face verification
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation("com.github.arya458:FaceVerification:1.0.0")
implementation("com.google.mlkit:face-detection:16.1.7")
}
@Composable
val context = LocalContext.current
val faceDetectionCallback = remember {
object : FaceDetectionCallback {
override fun onManyFacesDetected(
faces: List,
imageProxy: ImageProxy
) {
}
override fun onOneFaceDetected(face: Face, imageProxy: ImageProxy) {
// One face detected! Process the imageProxy here.
val base64Image = imageProxyToBase64(imageProxy)
base64Image?.let {
android.util.Log.d("FaceVerification", "Base64 Image (first 50 chars): ${it.substring(0, 50)}...")
// Send to your verification backend or process locally
}
imageProxy.close() // Remember to close the ImageProxy
}
override fun onFaceDetectionError(exception: Exception) {
}
override fun onNoFaceDetected(imageProxy: ImageProxy) {
android.util.Log.d("FaceVerification", "No face detected")
// Handle no face detected scenario
}
}
}
FaceVerificationComponent(
onSmile = {},
onFaceDetected = {},
onFacesDetected = {},
noFaceDetected = {},
onError = {}
)
}
Found an issue? Report it on GitHub
Have an idea? Share it with us
Contribute code to improve the library