Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscgdev committed Feb 27, 2018
2 parents b1f80bf + f2bc0b9 commit d2c4a7a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Expand Up @@ -50,6 +50,7 @@ Here is a complete snippet of it usage:
new FingerAuthDialog(this)
.setTitle("Sign in")
.setCancelable(false)
.setMaxFailedCount(3) // Number of attemps
.setPositiveButton("Use password", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Expand All @@ -71,6 +72,39 @@ new FingerAuthDialog(this)
public void onError() {
Toast.makeText(MainActivity.this, "onError", Toast.LENGTH_SHORT).show();
}
})
.show();
```

Show dialog only on devices that support fingerprint auth:

```java
boolean hasFingerprintSupport = FingerAuth.hasFingerprintSupport(this);

if (hasFingerprintSupport)
fingerAuthDialog.show();
```

### Implementing your own method

```java
new FingerAuth(this)
.setMaxFailedCount(3) // Number of attemps
.setOnFingerAuthListener(new FingerAuth.OnFingerAuthListener() {
@Override
public void onSuccess() {
// do something
}

@Override
public void onFailure() {
// do something
}

@Override
public void onError() {
// do something
}
});
```

Expand Down

0 comments on commit d2c4a7a

Please sign in to comment.