Giter VIP home page Giter VIP logo

Comments (8)

uccmawei avatar uccmawei commented on May 27, 2024 2

好,那就改为不限制版本号,直接调用,去到魅族的就识别下魅族的设备。
我晚点处理这个问题,谢谢了。

from fingerprintidentify.

uccmawei avatar uccmawei commented on May 27, 2024

@QuincySx
如果是这样的话,我觉得都没必要判断版本号了,直接调用,拿得到就拿得到,拿不到就是不支持,简单粗暴?
但是这样的话可能会引出魅族的SDK的一个问题,根据魅族官方的说明,他们主类如果能获取到实例,就说明是支持指纹识别的,然后再判断已经录入的指纹个数就可以。
但是,在个别的非魅族的设备系统上,魅族的SDK的主类,也能获取到实例,这样就会误判为设备是支持指纹的,但是没有录入指纹。

from fingerprintidentify.

QuincySx avatar QuincySx commented on May 27, 2024

我现在是这样做的
static {
final int version = Build.VERSION.SDK_INT;
if (version >= 23 || isAdapter()) {
IMPL = new Api23FingerprintManagerCompatImpl();
} else {
IMPL = new LegacyFingerprintManagerCompatImpl();
}
}

private static boolean isAdapter() {
    String model = Build.MODEL;
    List<String> phoneModels = //单独优化的设备列表 如 “OPPO R9”
    for (String m : phoneModels) {
        if (model.indexOf(m) != -1) {
            return true;
        }
    }
    return false;
}

from fingerprintidentify.

uccmawei avatar uccmawei commented on May 27, 2024

根据Build.MODEL来判断的话,纯在一定的稳定性,有些设备不一定能从这里区分出来。
所以我觉得与其判断全部设备,是否直接在魅族的适配入口做些单独适配更好?

from fingerprintidentify.

QuincySx avatar QuincySx commented on May 27, 2024

在个别的非魅族的设备系统上,能获得实例,获取不了录入指纹个数,其实也就可以是说不支持呗

from fingerprintidentify.

uccmawei avatar uccmawei commented on May 27, 2024

但是如果真的是魅族手机没录入指纹,这样就也会被误判为不支持了,所以我觉得需要去问下魅族那边的相关技术人员,或者说直接在魅族的指纹SDK调用部分,识别一下魅族的机型吧。

from fingerprintidentify.

uccmawei avatar uccmawei commented on May 27, 2024

因为,“不支持指纹”和“支持指纹但是没录入指纹”这两种状态,是可以用于不同的业务情景的。

from fingerprintidentify.

QuincySx avatar QuincySx commented on May 27, 2024

在调用魅族指纹SDK前判断一下 品牌 这个靠谱

from fingerprintidentify.

Related Issues (20)

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.