Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Activity found to handle Intent { act=android.settings.BIOMETRIC_ENROLL (has extras) }

Tags:

android

I am implementing fingerprint authentication on my app. If the user hasn't set up a fingerprint on his device. I am trying to open system settings for enrolling fingerprints. According to documentation(https://developer.android.com/training/sign-in/biometric-auth), this is the code for opening the setting activity for enrolling fingerprint.

 final Intent enrollIntent = new Intent(Settings.ACTION_BIOMETRIC_ENROLL);
    enrollIntent.putExtra(Settings.EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED,
            BIOMETRIC_STRONG | DEVICE_CREDENTIAL);
    startActivityForResult(enrollIntent, REQUEST_CODE);

I have tested the app on two devices. In Samsung, the code is working. But in an Asus device, it is not working.

like image 345
sum20156 Avatar asked Jan 19 '26 16:01

sum20156


1 Answers

As in the Google documentation "ACTION_BIOMETRIC_ENROLL" added at API 30, that's what causes your app to crash

like image 64
Trường Nguyễn Avatar answered Jan 23 '26 21:01

Trường Nguyễn