Which Samsung devices do not support android's native fingerprint API?
Asked Answered
B

3

12

I'm assuming that no phones with OS before marshmallow support the fingerprint API.

My questions are:

(a) Do all/any Samsung phones released with marshmallow support android fingerprint API

(b) Does any Samsung phones whose OS is upgraded to marshmallow support Android fingerprint API?

I've read these:

Fingerprint scanner not detected when using Android 6.0 Fingerprint API on Samsung S5

Samsung galaxy note 4 fingerprint not found

Android FingerPrint API isHardwareDetected returns false for Samsung Note 4

Devices with fingerprint sensor above 6.0 which are not using Android fingerprint SDK

but no definitive answers. Also samsung's website mentions that all samsung devices support Pass SDK but doesn't mention android fingerprint API support

Blackdamp answered 4/8, 2017 at 6:34 Comment(7)
Yes it supports..I had tried playing with those a couple months backSuttee
yes, but which all devices do not support android's API? Different people seem to be having different experiences based on the model in question and the android version on itBlackdamp
I had tried it on s7 marshmallow..which device you want to get it running on?Suttee
It's for an app I'm publishing. I'd like to know on which devices it doesn't work, because my users will probably have slightly older phones (dont know which all they'll have). so i'd like to ensure maximum compatibility. if the number of phones is significant i'll try to ensure support for both pass SDK and android APIBlackdamp
Also It'd be good for troubleshooting if any users report not being able to use the feature, I can know whether its a bug or notBlackdamp
Are you targeting for samsung only...if yes post on developer.samsung.com the forumSuttee
No. all phones. I might probably use a wrapper around both if there's no answer. I think Nexus too has its own SDKBlackdamp
T
3

From my small investigation a had found the following. Pass API will help with Samsung devices, which had fingerprint api before android 6. It is devices of 2014 year with a fingerprint. The list of devices can be found here. https://en.wikipedia.org/wiki/Samsung_Galaxy The main devices:

  1. Samsung Galaxy s5 (and its modifications mini, plus)
  2. Samsung Galaxy Note 4 (Note 4 edge)

They do not support the standard Google FingerPrint Api even after updating android to 6 version.

Theomorphic answered 9/10, 2018 at 9:31 Comment(0)
A
2

After understanding more clearly requirement from comment below my answer, here is updated answer

Pass is the SDK responsible for Fingerprint feature for Samsung devices. What you can do, you can check if device is using Pass SDK or not.

Below is code to check it:

    FingerprintManager fingerprintManager = (FingerprintManager) getApplicationContext().getSystemService(Context.FINGERPRINT_SERVICE);
    boolean isFingerprintSupported = fingerprintManager != null && fingerprintManager.isHardwareDetected();

    if (!isFingerprintSupported && SsdkVendorCheck.isSamsungDevice()) { // for samsung devices which doesn't support Native Android Fingerprint API
        Spass spass = new Spass();
        try {
            spass.initialize(context);
            isFingerprintSupported = spass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT);
        } catch (SsdkUnsupportedException | UnsupportedOperationException e) {
            //Error handling here
        }
    } else {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { // for devices which doesn't support Pass SDK

            FingerprintManager fingerprintManager = (FingerprintManager) getApplicationContext().getSystemService(Context.FINGERPRINT_SERVICE);
            if (!fingerprintManager.isHardwareDetected()) {
                // This device is not supporting fingerprint authentication     
            } else if (!fingerprintManager.hasEnrolledFingerprints()) {
                // User hasn't enrolled any fingerprints to authenticate with 
            } else {
                // Everything is ready for fingerprint authentication 
            }
        }
    }

Add below permissions to AndroidManifest.xml.

<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY" />

I hope this will help.

Admonition answered 27/6, 2018 at 0:50 Comment(9)
Hi, Thanks for the answer, but the question was whether Samsung kept using their own SDK for fingerprints or whether they switched to the native android SDK after M. We wanted to know this case for (a) devices that came with M and (b) devices that were updated to M. We finally decided to ignore all other SDKs and just support devices with the native SDK. Thank you for the answer thoughBlackdamp
@Blackdamp thanks for your patience and making requirement more clear. I have updated my answer. Please have a look. I think you will get some pointer from it.Admonition
@Blackdamp did you check my answer? I didn't hear any comment from you after my update.Admonition
HI, sorry about that. Your code seems to be covering all the bases regarding checking for both APIs. As I was handling this a long time ago, I decided to support only native API, so I forgot about this. Had upvoted your answer as it should work for all cases involving Samsung phones :)Blackdamp
@Blackdamp As you have changed your mind i.e. requirement but my answer will cover all the cases then please accept my answer so that may help others as well.Admonition
@Blackdamp by the way, my initial answer was just to support Native API but you told that you want to check for Samsung SDK as well so I updated my answer :)Admonition
Again, thanks for the answer. Although your answer does show how to support both APIs, my question was regarding whether Samsung switched to native API, so that We could decide whether it was worthwhile to support pass along with native. see Evgeniy Mishustin's answer https://mcmap.net/q/947515/-which-samsung-devices-do-not-support-android-39-s-native-fingerprint-apiBlackdamp
I already knew how to support fingerprint API from the start. The question was whether Samsung used pass over native in their phones ( this was my requirement from the start)Blackdamp
is this answer still valid? i tried adding spass sdk dependencies and android studio did not recognise it.Hartebeest
M
1

I can definitely tell you from my own experience that several Samsung phones continue to use Spass library even on Android M and over. For example right now I'm testing on Mobile OS: Android 6.0.1 (Galaxy Note 4 Edge). I've wrote some code that prints output to the logs in this way:

   /*
    * This function evaluates which fingerprint helper should be instantiated (if any)
    */
    public static FingerprintHelper initializeFingerprintHelper(Context context){
        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            FingerprintManager manager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);

            if (manager != null) {
                logger.info("Android native fingerprint manager exists");
                if (manager.isHardwareDetected()) {
                    logger.info("Android native fingerprint manager detected hardware");
                    if (manager.hasEnrolledFingerprints()) {
                        logger.info("Android native fingerprint manager has enrolled fingerprints");
                    }else{
                        logger.info("Android native fingerprint manager has no enrolled fingerprints");
                    }
                    return new AndroidFingerprintHelper(context);
                }

            }
        }
        try{
            logger.info("Android native fingerprint manager is null, trying Samsung SPASS rollback");

            Spass spass = new Spass();
            spass.initialize(context);
            if(spass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT)){
                return new SamsungFingerprintHelper(context);
            }
        } catch (SsdkUnsupportedException e) {
            logger.error("Spass library is missing on the device");
        }
        return null;
    }

And from the logs in the console I see that although Android Version on the devices is M(6.0.1) - the method

manager.isHardwareDetected()

returns false and the method goes to Spass lib initialization and it suceeds. So the device definitely using Spass library on android M.

Manda answered 4/7, 2018 at 7:49 Comment(2)
So, this is a device which released pre-marshmallow and updated to marshmallow right?Blackdamp
@ColonD, I can't tell this for 100%.Manda

© 2022 - 2024 — McMap. All rights reserved.