New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPPO R9 指纹识别问题 #11
Comments
@QuincySx 这么神奇?我没有OPPO机器,我这里没法测试这点 public final T getSystemService(Class serviceClass) { 但是根据代码来看,2个方法最后都是调用到同一个方法的呀,除非是OPPO把这段代码改掉了? getSystemServiceName(FingerprintManager.class) context.getSystemService(FingerprintManager.class); 你可以对比下这几个方法或者常量在你的OPPO机器上的返回值吗? |
1.使用这个方法会抛出异常 java.lang.NoSuchMethodError: No virtual method getSystemService(Ljava/lang/Class;)Ljava/lang/Object; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar:classes2.dex) 2.这个方法也会抛出异常 java.lang.NoSuchMethodError: No virtual method getSystemServiceName(Ljava/lang/Class;)Ljava/lang/String; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar:classes2.dex) 3.正常返回 FingerprintManager 4.FINGERPRINT_SERVICE 的值 “fingerprint” |
@QuincySx 阿西吧,简直无语,API都被他们砍掉了,那只能我这边改一下了,谢谢大兄弟的提醒! |
OPPO R9 系统版本是 5.1
但是官方声称是基于官方源码修改的,支持官方API
作者的库无法在OPPO R9上使用
FingerprintManagerCompatApi23 类下的 这个方法
private static FingerprintManager getFingerprintManagerOrNull(Context context) {
return context.getSystemService(FingerprintManager.class);
}
我对 OPPO R9 进行的单独判断
private static FingerprintManager getFingerprintManagerOrNull(Context context) {
return (FingerprintManager) context.getSystemService(FINGERPRINT_SERVICE);
}
可以正常使用 OPPO R9 指纹识别
The text was updated successfully, but these errors were encountered: