Git Product home page Git Product logo

Comments (7)

szczepcio95 avatar szczepcio95 commented on June 22, 2024 2

Okey, I've got something. Just before authenticating try this

if (Platform.OS === 'android' && Platform.Version <= 23 ) {
            // not performing any TouchID actions
        }

from react-native-touch-id.

gazaret avatar gazaret commented on June 22, 2024 1

Fixed in #96

from react-native-touch-id.

szczepcio95 avatar szczepcio95 commented on June 22, 2024

Any ideas? Having the same problem

from react-native-touch-id.

marcorm avatar marcorm commented on June 22, 2024

I think, in

FingerprintAuthModule.java

this:

  public void isSupported(Callback reactErrorCallback, Callback reactSuccessCallback) {
    keyguardManager = (KeyguardManager) getCurrentActivity().getSystemService(Context.KEYGUARD_SERVICE);
    fingerprintManager = (FingerprintManager) getCurrentActivity().getSystemService(Context.FINGERPRINT_SERVICE);
    if(!isFingerprintAuthAvailable()) {
      reactErrorCallback.invoke("Not supported.");
    } else {
      reactSuccessCallback.invoke("Is supported.");
    }
    return ;
  }

should become something like:

  public void isSupported(Callback reactErrorCallback, Callback reactSuccessCallback) {
    if(!isFingerprintAuthAvailable()) {
      reactErrorCallback.invoke("Not supported.");
    } else {
      keyguardManager = (KeyguardManager) getCurrentActivity().getSystemService(Context.KEYGUARD_SERVICE);
      fingerprintManager = (FingerprintManager) getCurrentActivity().getSystemService(Context.FINGERPRINT_SERVICE);
      reactSuccessCallback.invoke("Is supported.");
    }
    return ;
  }

Correct me if i'm wrong...

from react-native-touch-id.

marcorm avatar marcorm commented on June 22, 2024

Hi @gazaret , are you sure your solution work? Because the solution i proposed is unstable...

from react-native-touch-id.

gazaret avatar gazaret commented on June 22, 2024

Hi @marcorm , yes it was unstable on api 23+.
Now fixed this.
Tested on android 4.4 and 7.0. It works.

from react-native-touch-id.

zibs avatar zibs commented on June 22, 2024

We now have some handling for this in 4.0.3 - please give it a shot and let us know by opening a new issue if the problem persists.

from react-native-touch-id.

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.