Search code examples
androidsecurityauthenticationfingerprintandroid-fingerprint-api

can we add fingerprint from my app programmatically


I have search lot on internet/stackoveflow how to add fingerprint from custom app but couldn't found any clue

In short Requirement - I am creating app that will allow user to enter into my app by scanning fingerprint.

I have check code that will scan finger on sensor and return fingerprint data already set by user (He/She set from setting) but in case if there are multiple finger set by multiple user than my app allow all the user to enter into my app which i don't want

What I want - Code that add fingerprint from my app and allow only that user not all the user to enter into my app

Now some question -

  1. is it possible to do this?
  2. is there any other way to archive this
  3. is this secure way to do so because my application is banking related

Solution

  • but in case if there are multiple finger set by multiple user than my app allow all the user to enter into my app which i don't want

    You have no way of distinguishing between "multiple finger set by multiple user" and "multiple finger set by one user". Most people have more than one finger.

    Code that add fingerprint from my app and allow only that user not all the user to enter into my app

    You can require that the person holding the device scan their fingerprint and have that be authenticated against registered fingerprints. You have no way of knowing who the person is who scanned their fingerprint and their relationship with the owner of the device. It might be the owner, or it might not. That is up to the device owner, not you.

    This is no different than most other forms of authentication. For example, if your app required a custom PIN, and the user shared that PIN with somebody else, that is the user's choice. It may be a stupid choice, or it may not (e.g., it is shared with a spouse).