|
1 | 1 | # mobile-passcode |
2 | | -Library for passcode implementation along with an optional additional feature to ask for passcode when your app resumes from background. (Works with minSDK >= 15) |
| 2 | +Library for Passcode and Fingerprint Authentication implementation along with an optional additional |
| 3 | +feature to ask for passcode when your app resumes from background. (Works with minSDK >= 15) |
3 | 4 |
|
4 | 5 | Usage |
5 | 6 | ----- |
@@ -60,10 +61,35 @@ public class PassCodeActivity extends MifosPassCodeActivity { |
60 | 61 | return EncryptionUtil.DEFAULT; |
61 | 62 | } |
62 | 63 |
|
| 64 | + @Override |
| 65 | + public String getFpDialogTitle() { |
| 66 | + //Title to be shown for Fingerprint Dialog |
| 67 | + return getString(R.string.fingerprint_dialog_title); |
| 68 | + } |
63 | 69 | } |
64 | 70 |
|
65 | 71 | ``` |
66 | 72 |
|
| 73 | +## Fingerprint Authentication |
| 74 | + |
| 75 | + - Mention the title of Fingerprint Dialog by overriding **getFpDialogTitle()** method. |
| 76 | + |
| 77 | + - If the device supports Fingerprint Authentication, then a dialog will be shown to the user to enable Fingerprint |
| 78 | + Authentication at first time. If the user chooses "No", then he/she will be prompted to the Passcode Screen. |
| 79 | + |
| 80 | + - If the user opts for Fingerprint Authentication, then a dialog will appear asking user to "Touch the Sensor" in |
| 81 | + order to access the app. |
| 82 | + |
| 83 | + - On **successful** authentication, **startNextActivity()** method will be executed. |
| 84 | + |
| 85 | + - In case the Authentication **fails**, then after a 1 second delay, the dialog will again ask for Authentication. |
| 86 | + |
| 87 | + - There is also an option to **cancel** Fingerprint Authentication, if chosen results in the execution of |
| 88 | + **StartLoginActivity()** method. |
| 89 | + |
| 90 | + - This feature won't work if the Device doesn't have a fingerprint scanner or if the Android Version is below |
| 91 | + **Android Marshmallow (Android 6)**. In this case, the user will be directly prompted to the Passcode Screen. |
| 92 | + |
67 | 93 | There are 4 different types of encryption methods available with respect to our Android Projects: |
68 | 94 | - DEFAULT |
69 | 95 | - MOBILE_BANKING |
|
0 commit comments