Git Product home page Git Product logo

bws-android's Introduction

BWS-Android

About

The BioID Web Service (BWS) is a cloud-based online service providing a powerful multimodal biometric technology with liveness detection to application developers. But often developers have some trouble writing a user interface for collecting the data required to perform the biometric tasks, notably face images. Therefore we want to provide some sample code that might be used in Android to interact with the BWS.

Please also take a look at the Developer Documentation.

BioID’s liveness detection is a software-based security feature for facial biometrics. Also called presentation attack detection (PAD), it distinguishes live persons from fakes such as photo/video replays or masks.

Before you start developing a BioID app - you must have the following credentials

  • You need a BioID Account with a confirmed email address.
  • After creating the BioID Account you can request a free trial instance for the BioID Web Service (BWS).
  • After the confirmation for access to a trial instance you can login to the BWS Portal.
  • The BWS Portal shows you the activity for your installation and allows you to configure your test client.
  • After login to the BWS Portal configure your test client. In order to access this client, please do the steps below.
  • Click on 'Show client keys' on your clients (the 'key' icon on the right). The dialog 'Classic keys' opens.
  • Now create a new classic key (WEB API key) for your client implementation by clicking the '+' symbol.
  • You will need the AppId and AppSecret for your client implementation.

⚠️ Please note that we only store a hash of the secret i.e the secret value cannot be reconstructed! So you should copy the value of the secret immediately!

Click on your BWS client on symbol „Update Classic client“ (the ‘pencil’ icon on the right). A dialog opens that contains all information for accessing the BWS, as well as other information needed for the user BCIDs.

For the creation of BCIDs for users in your app the following information is needed:

  • Storage e.g. bws
  • Partition e.g. 12
  • UserID – this is a unique number you assign to the user, e.g. 4711

The BCID with the example values from above is bws.12.4711. Take a look at Web API endpoint for e.g. https://bws.bioid.com. In this case the BWS instance name is bws.

Now you can add the following properties to your users gradle.properties file.

  • BioIdBwsInstanceName
  • BioIdAppId
  • BioIdAppSecret
  • BioIdBcid

If you need more information about the gradle.properties file read Chapter 12 of the official gradle docs.

Integration

If you want to integrate this code into your Android app follow these steps:

  1. setup your app/build.gradle 1. make sure that your minSdkVersion is 23 (Android 6.0) or higher 2. make sure you enabled Data Binding 3. make sure you enabled Support Vector Drawables 4. add all buildConfigField entries from the android/productFlavors/bws section within app/build.gradle to your project (the actual values are provided by your users gradle.properties file, have a look at the Setup section) 5. add all compile dependencies from app/build.gradle to your project

  2. setup your AndroidManifest.xml 1. add all uses-feature entries from app/src/main/AndroidManifest.xml to your project 2. add all uses-permission entries from app/src/main/AndroidManifest.xml to your project 3. add these two activity declarations to your project

    <activity android:name="com.bioid.authenticator.facialrecognition.verification.VerificationActivity"/>
    <activity android:name="com.bioid.authenticator.facialrecognition.enrollment.EnrollmentActivity"/>
    
  3. copy all Java source files from app/src/main/java and app/src/bws/java/com/bioid/authenticator/base to your project (do not modify any package names)

  4. copy or merge all Android resources from app/src/main/res to your project (of course you do not have to insert the mipmap app icons)

  5. adjust all imports of com.bioid.authenticator.BuildConfig, com.bioid.authenticator.R and import com.bioid.authenticator.databinding.* in the copied Java sources to your package name

  6. have a look at app/src/bws/java/com/bioid/authenticator/main/MainActivity.java on how to start the verification or enrollment process

Flavors

In case you are wondering why the code is split into the main and bws source set, this is because of the closed source connect flavor. The connect flavor uses BioID Connect as identity management. You can try out this facial recognition app - available via Play Store.

bws-android's People

Contributors

mebealex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bws-android's Issues

project not import

ERROR: For input string: ""
Open File

showing error when import project

BWS-Android-master gradle issue proect not sync

Error message:
Gradle 'BWS-Android-master' project refresh failed
CreateProcess error=2, The system cannot find the file specified

The error arise from file app/build.gradle, line 94:
line 93: static def commitCountOfCurrentBranch() {
line 94: return Integer.parseInt(['git', 'rev-list', '--count', 'HEAD'].execute().text.trim())
line 95: }

I problem when using for example

Hello team!

I problem when using for example. I can not find com.bioid.authenticator.databinding. *
Please support and add the necessary files to rebuild the project.

Gradle 'BWS-Android-master' project refresh failed

Error message:
Gradle 'BWS-Android-master' project refresh failed
CreateProcess error=2, The system cannot find the file specified

The error arise from file app/build.gradle, line 94:
line 93: static def commitCountOfCurrentBranch() {
line 94: return Integer.parseInt(['git', 'rev-list', '--count', 'HEAD'].execute().text.trim())
line 95: }

The error appeared right after I open the downloaded project from here to android studio.
Please help me solve this problem... Thank you..

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.