Customization
You can customize your screen texts, colors, images, and buttons.
See a Complete Example below.
Understand the Flow
There are 4 flows:
PinEnrollment: This flow allows the user to register their PIN for the first time, then register their biometricsPinVerification: This is used to verify the user's biometrics or use PIN.PinReset: This is used to reset user's pin if they forgot the pin by sending a code to their email or phone number.PinChange: This is used to change the user's pin if they know what the current pin is.
1. Customize the header title of each screen
Screen names for Pin Enrollment flow:
PinEnrollmentEnterPin,PinEnrollmentReEnterPinScreen names for Pin Verification flow:
PinVerificationScreen names for Pin Reset flow:
PinReset,PinResetEnterPin,PinResetReEnterPinScreen names for Pin Change flow:
PinChangeVerifyPin,PinChangeEnterPin,PinChangeReEnterPin
To customize the Header of each screen, call Cotter.strings.setHeaders(<ScreenName>, <YourHeader>).
Cotter.init(this.getApplicationContext(), "https://www.cotter.app/api/v0",
getString(R.string.user_id), // user id
getString(R.string.api_key_id), // api key id
getString(R.string.api_secret_key)); // api secret key
// Setting strings for Headers
Cotter.strings.setHeaders(ScreenNames.PinEnrollmentEnterPin, "Activate PIN");
Cotter.strings.setHeaders(ScreenNames.PinEnrollmentReEnterPin, "Confirm PIN");
Cotter.strings.setHeaders(ScreenNames.PinVerification, "Verification");
Cotter.strings.setHeaders(ScreenNames.PinChangeVerifyPin, "Change PIN");
Cotter.strings.setHeaders(ScreenNames.PinChangeEnterPin, "New PIN");
Cotter.strings.setHeaders(ScreenNames.PinChangeReEnterPin, "Confirm New PIN");
Cotter.strings.setHeaders(ScreenNames.PinReset, "Reset PIN");
Cotter.strings.setHeaders(ScreenNames.PinResetEnterPin, "Activate New PIN");
Cotter.strings.setHeaders(ScreenNames.PinResetReEnterPin, "Confirm New PIN");2. Customize Pin-Enrollment Enter Pin Screen
This is the first screen on the PinEnrollment flow.

To set the text for a specific element on a screen, specify the screen name, the name of the element, and the value.
The syntax is like the following:
For example, if you want to update the Title to "Enter PIN":
Put this below Cotter.init before you start any flow.
Advanced Customization
Setting the colors
As shown in the picture, there are 3 main colors that you can set:
ColorAccentColorPrimaryColorDanger
For the full list of colors that you can set, see Setting Colors and Images.
Error Text Views
There are 3 different places where errors may pop up:
PinEnrollmentEnterPin: Error happens when the PIN is too weak, with the errorStrings.ErrorCombination. To update:
PinEnrollmentReEnterPin: Error happens when the PIN is not the same as the PIN entered originally, with the errorStrings.ErrorNoMatch. To update:
PinVerification: Error happens when the user entered an invalid PIN, with the errorStrings.ErrorInvalid. To update:
3. Customize PinEnrollmentSuccess page
To change the image, add the image in your /drawable directory, and add the following:
To edit the texts, it's the same as the instructions before. See the Complete Example below.
For the full list of images that you can set, see Setting Colors and Images.
4. Customize PinVerification and PinReset Screen

4. Customize Alert Dialogs.
There are 2 places where an AlertDialog will pop-up:
PinEnrollmentEnterPin: AlertDialog pop up when the user clicks 'X' to exit the screen.PinVerification: On a very rare occasion, the signature generated by the biometrics may be invalid. In which case, the AlertDialog will pop up.
To update the AlertDialog strings on the PinEnrollmentEnterPin screen:
5. Customize Biometric Prompt
There are 2 screens where the BiometricPrompt will pop up:
PinEnrollmentSuccess: when Pin Enrollment is successful, user can then enroll their biometricsPinVerification: When user's default authentication method is biometrics, user will be prompted to verify their biometrics when an authentication is required.
Complete Example
See the full list of API for:
Screen Names Reference




Last updated