Skip to content
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

Taking too much time to authenticate on real device. #171

Open
jimkhan opened this issue Feb 2, 2021 · 0 comments
Open

Taking too much time to authenticate on real device. #171

jimkhan opened this issue Feb 2, 2021 · 0 comments

Comments

@jimkhan
Copy link

jimkhan commented Feb 2, 2021

I'm using "react-native-fingerprint-scanner": "^6.0.0" it works fine on emulator. But when I built apk it taking too much time(3 or 4 seconds) to authenticate on a real device. What can I do?

Here is my code:

const SplashBeforeFingerprint = ({ navigation }) => {

    useEffect(() => {
            FingerprintScanner
                .authenticate({ description: 'Scan your fingerprint on the device scanner to continue' })
                .then(() => {
                        /// nothing to do
                })
                .catch((error) => {
                    Alert.alert(
                        "Authentication failed",
                        "Your fingerprint doesn't matches! Try agin later!",
                        [
                            {
                                text: "Exit",
                                onPress: () => BackHandler.exitApp(),
                                style: "cancel"
                            },

                        ],
                        { cancelable: false });
                });

    }, []);

    return (
        <ImageBackground source={require("../img/Splash2.png")} style={styles.imageContainer} >
            <View style={styles.buttonContainer} >
                <AppButton style={styles.button} textStyle={styles.text} name={"Go to Home"} onPress={() => navigation.reset({
                    index: 2,
                    routes: [{ name: 'NewWallet' }],
                })} />

            </View>
        </ImageBackground>
    ) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant