pro100svitlo / FingerprintAuthHelper

A small library that allows You to easily manage fingererprint authentication inside your Activity or Fragment on devices with fingerprint scanner and Android M and higher. Min sdk 14
449 stars 67 forks source link

mFAH.isHardwareEnable() returns false, for Oppo F1 plus fingerprint phone. #6

Open Muneefm opened 7 years ago

Muneefm commented 7 years ago

my code is working well with oneplus 3, but when i try debugging in Oppo F1 plus mFAH.isHardwareEnable() returns false

pro100svitlo commented 7 years ago

i see that they use some special os. can you please tell me the sdk number of this os version?

Muneefm commented 7 years ago

@pro100svitlo the OS version is 5.1 , API level 22

pro100svitlo commented 7 years ago

official docs say that fingerprint scanner works from api level 23. but there are also few chinas phones with api level lover the 23 (Oppo for example), that have fingerprint scanner... to be honest - i have no idea how they work correctly!

i know about this issue, but still doesn't know how to fix it. I will try again to find some solution in nearest future!

Muneefm commented 7 years ago

Well, i cannot find any fingerprint API information of oppo phones. guess will have to skip those phones. :D

Bombo commented 7 years ago

From my point-of-view this library only supports the official Android SDK23 Fingerprint API. Yes, it does work back to SDK 14, but just to fail gracefully for unsupported versions/devices.

hwalidh commented 7 years ago

The same problem with oppo F1s the OS version 5.1 API 22. Is there still no solution for this problem?

Bombo commented 7 years ago

I don't know if there even an exposed API for these kinds of proprietary fingerprint solutions. Do you know of any (optimally open source) apps which do work with that sensor?

hwalidh commented 7 years ago

I tried several source code but it does not work with oppo. I figured that can be oppo uses his own SDK. PS: the Samsung have their own SDK for the fingerprint sensor.

pro100svitlo commented 7 years ago

I know there also same problem with some models of xiaomi. API 21 and 22. so i think this "few" models implement their own code. cos as was said before, the lowest official API is 23.

pro100svitlo commented 7 years ago

@Bombo what if add some try/catch for lower sdk version? :) @hwalidh i will create new branch soon, and will try to fix this issue. but i have no oppo or xiaomi phone, so can I ask for test later?

hwalidh commented 7 years ago

@pro100svitlo yes of course. What did you think if I do the version OS 6.0 manually on my oppo F1s. Will it work isHardwareDetected ()?

pro100svitlo commented 7 years ago

in fact - I have no idea :) chinas phones - its a mystery...

Muneefm commented 7 years ago

@Bombo @pro100svitlo @hwalidh hi if you have a oppo or xiomi phones can you check with other apps like paypal or any other third-party apps ( Not any apps of oppo ) using fingerprint features to see if they are using fingerprint in oppo also . if not these companies like oppo or xiomi are not letting developers to use their fingerprint hardware. and so we will have to implement other means of authentication for the false condition in mFAH.isHardwareEnable()

and for other brands which have fingerprint SDK like samsung we can check the model in code and implement their code accordingly. i think this is the best way right now.

please correct me if am wrong.

hwalidh commented 7 years ago

@Muneefm very good idea, but I haven't found application under android 5.1 or 6.0 that use the digital fingerprint sensor...

pro100svitlo commented 7 years ago

@Muneefm, i have no xiaomi or oppo, so I can't check... but i will try to fix this issue soon, i will inform you when it will be ready for test. about sumsung fingerprint sdk - as I know, thay use their own fingerprint sdk only in few early models that has scanners. all new phones has ordinary scanner and sdk provided by google.

@Muneefm can you post for link for this app?

FlogFly commented 7 years ago

FingerprintManagerCompat.isHardwareDetected and FingerprintManagerCompat.hasEnrolledFingerprints always return false . but FingerprintManager.isHardwareDetected and FingerprintManager.hasEnrolledFingerprints return true . my phone is xiaomi for API 23 , Android 6。。。 why ????

pro100svitlo commented 7 years ago

@qaz349293703 okey, and what the real situation? has your device sensor and enrolledFingerprints or no?

FlogFly commented 7 years ago

real situation is isHardwareDetected and hasEnrolledFingerprints should return true . so the compat class is wrong return.

pro100svitlo commented 7 years ago

@qaz349293703 so my library works fine, am I right? :)

FlogFly commented 7 years ago

yes..you library works fine ,but i have this problem ,if you konw why ( my phone has fingerprint ,but FingerprintManagerCompat.isHardwareDetected and FingerprintManagerCompat.hasEnrolledFingerprints always return false). please tell me thanks .

hwalidh commented 7 years ago

@qaz349293703 You can view this link https://github.com/multidots/android-fingerprint-authentication/issues/4#issuecomment-298834060

pro100svitlo commented 6 years ago

Hi guys! @hwalidh @Muneefm sorry for so long time without answer.... have an idea! add some kind of deviceWhiteList, right now there only two: F1 plus and F1 s.

can you please check this apk on some of this devices?

sample-debug.apk.zip

jimmyleonardo commented 6 years ago

@qaz349293703 I got same issue here..