1.0.2 • Published 3 years ago

react-native-fingerprint-uareu-v1 v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-native-fingerprint-uareu-v1

About The Project

This package is a bridge to the uareu library developed for Android in Java.

Allows a mobile application developed in React Native to use the external fingerprint reader digitalPersonal 4500.

This project works only on Android, in some future it could be implemented for IOS

Getting started

`$ npm install react-native-fingerprint-uareu-v1 --save`

If you have problems with the installation try the following command:

`$ npm install react-native-fingerprint-uareu-v1 --force`

Mostly automatic installation (optional)

`$ react-native link react-native-fingerprint-uareu-v1`

Important Settings

  1. Open up android/app/src/main/AndroidManifest.xml - Change or Add this line:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    		package="com.[yourprojectname]">
    		   // .. rest of your code 
    <application
    		   // .. rest of your code 
    
    		android:allowBackup="true"  <-- Change this line to "true" or add.
    />
    		   // .. rest of your code 
    </application>
    </manifest>

Usage

import FingerPrintUareu from 'react-native-fingerprint-uareu-v1'

const App = () => {
  const [fingerPrintPick, setFingerPrintPick] = useState('');

  const scanFinger = async () => {
    var { encoded, convertBase64 } = await FingerPrintUareu.startScan();
	//var convertBase64 is encoded with WSQEncoder
	//var encoded is encoded in base64
    setFingerPrintPick(encoded);
  }

  return (
    <SafeAreaView>
		/* Change this implementation at your convenience */
      <Text>Finger: {fingerPrintPick}</Text>
      <Button
        onPress={() => scanFinger()}
        title="Escanear"
      />

    </SafeAreaView>
  );
};

Implementation In Android

If you want to build the same project exclusively for Android check out my repository:

Contact

Alejandro Sazo - ottoalejandrobonilla2014@gmail.com

Project Link: https://github.com/alejandrosazo/react-native-fingerprint-uareu

Acknowledgements

Special thanks to Steven Hodgson steven@kanopi.asia.

The base code can be found in the following repository: