Giter Site home page Giter Site logo

fingerprintidentify's Introduction

FingerprintIdentify

This is an expandable Android fingerprint api compatible lib, which also combine these api:

Android API:minimum support for Android 6.0 (more detail)

SamSung SDK:minimum support for Android 4.2 (more detail)

MeiZu SDK:minimum support for Android 5.1 (more detail)

Api priority level:Android > Samsung > MeiZu

中文版介绍 -- 传送门

1. Gradle

compile 'com.wei.android.lib:fingerprintidentify:1.2.1'

2. AndroidManifest

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

3. FingerprintIdentify api

mFingerprintIdentify = new FingerprintIdentify(this);                       // create object
mFingerprintIdentify = new FingerprintIdentify(this, exceptionListener);    // exception callback for develop only
mFingerprintIdentify.isFingerprintEnable();                                 // is fingerprint usable
mFingerprintIdentify.isHardwareEnable();                                    // is hardware usable
mFingerprintIdentify.isRegisteredFingerprint();                             // is fingerprint collected
mFingerprintIdentify.startIdentify(maxTimes, listener);                     // start identify
mFingerprintIdentify.cancelIdentify();                                      // cancel identify
mFingerprintIdentify.resumeIdentify();                                      // resume identify

4. startIdentify method

mFingerprintIdentify.startIdentify(3, new BaseFingerprint.FingerprintIdentifyListener() {
    @Override
    public void onSucceed() {
        // succeed, release hardware automatically
    }

    @Override
    public void onNotMatch(int availableTimes) {
        // not match, try again automatically
    }

    @Override
    public void onFailed(boolean isDeviceLocked) {
        // failed, release hardware automatically
        // isDeviceLocked: is device locked temporarily
    }

    @Override
    public void onStartFailedByDeviceLocked() {
        // the first start failed because the device was locked temporarily
    }
});

5. Proguard

# MeiZuFingerprint
-keep class com.fingerprints.service.** { *; }

# SmsungFingerprint
-keep class com.samsung.android.sdk.** { *; }

6. Notice

1. Usually, device will be locked temporarily when read incorrect fingerprints continuously 5 times.
   And it need to takes about 30 seconds to get back to normal.
   But it's not standardized, MeiZu SDK has no limit to this.

2. About 'com.android.support:appcompat-v7:25.3.1' version
   The class FingerprintManagerCompatApi23 will check the feature FEATURE_FINGERPRINT from version 25.
   More info:https://code.google.com/p/android/issues/detail?id=231939

3. Some manufacturers will transplant standard fingerprint API to the device
   which version less than Android M, such as OPPO.
   But the API will be modified sometimes and cause calling crash, such as VIVO.

4. We need to check the manufacturers because Meizu's sdk is available on some other devices.

5. MeiZu's SDK runs abnormally on MeiLan Note3 sometimes, it can't switch to mback mode event called release。

7. Version Update

v1.2.1 2017.07.25 Add new callback onStartFailedByDeviceLocked:The first start failed because the device was locked temporarily.

v1.2.0 2017.07.10 Add android M limit. Add new callback parameter to notice is that device locked temporarily。

v1.1.5 2017.06.14 FingerprintIdentify(Activity) --> FingerprintIdentify(Context).

v1.1.4 2017.05.24 Remove android M limit, add MeiZu manufacturer verify. See ISSUE#12

v1.1.3 2017.05.22 Update the method getFingerprintManager. See ISSUE#11

v1.1.2 2017.04.25 Modify AOSP's code,avoid the PackageManager.FEATURE_FINGERPRINT limit.

v1.1.1 2017.03.20 Modify gradle AppCompat lib version.

v1.1.0 2017.03.16 Modify package name and bug fixed.

v1.0.2 2017.02.17 Add exception callback.

v1.0.1 2017.02.15 Bug fixed.

v1.0.0 2017.02.10 Release v1.

License

Licensed under the MIT License, see the LICENSE for copying permission.

fingerprintidentify's People

Contributors

uccmawei avatar

Watchers

James Cloos avatar Dhanish Vijayan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.