Cotter
  • 🚀Getting Started
  • Features & Concepts
    • 💬Sign In with Email/Phone Number
    • 🔐Sign In with Device
      • How it works
    • 🧬Sign In with WebAuthn
  • 📌Quickstart Guides
    • All Guides & Tutorials
    • HTML – Sign in with Email/Phone
    • React – Sign in with Email/Phone
    • React – WebAuthn
    • ▲ Next.js
    • Angular
    • Webflow
    • Bubble.io
    • Python SDK for a CLI
    • React Native – Sign in with Device
    • iOS – Sign in with Device
    • Flutter – Sign in with Device
  • 📘SDK Reference
    • Web
      • Sign In with Email/Phone Number
        • Customize the Form
        • Checking the email or phone before sending a verification code
        • Sending Code or Link via WhatsApp
        • Styling
        • Older SDK
          • Customize the Form
      • Sign in with Social Login
        • Getting Access Tokens from Social Login Providers
        • Github Instructions
        • Google Instructions
      • Sign In with WebAuthn
        • Register WebAuthn for a logged-in user
      • Sign In with Device
        • Steps for Pop Up Authentication Prompt
        • Advanced Customization for Login Form
        • Advanced Customization for Pop Up Authentication Prompt
      • Getting Access Token and Logged-In User Info
      • Sending Successful Form Submission
      • FAQ & Troubleshooting
    • React Native
      • Installation
      • Sign In with Device
        • Add Email/Phone Verification
        • Authenticate from a Non-Trusted Device
        • Add a new Trusted Device
        • Remove Trusted Device
      • Sign In with Email/Phone Number
      • Getting Stored OAuth Tokens and User Information
      • FAQ
      • Older SDK Versions
        • Sign in with Email/Phone
        • Sending Code via WhatsApp
        • Sign In with Device
          • Authenticate from a Non-Trusted Device
          • Add a new Trusted Device
          • Customization
    • Flutter
      • Sign In with Device
        • Add Email/Phone Verification
        • Authenticate from a Non-Trusted Device
      • Sign in with Email/Phone Number
      • Getting the Logged-in User
      • Getting OAuth Tokens
      • Signing a User Out
    • iOS
      • Sign In with Email/Phone Number
      • Sign In with Device
        • Authenticate from a Non-Trusted Device
        • Push Notification
        • Check if Trusted Device is Enrolled
        • Add a New Trusted Device
        • Remove Trusted Device
      • Older Versions
        • Biometric/Pin
    • Android
      • Sign In with Device
        • Authenticate from a Non-Trusted Device
        • Check if Trusted Device is Enrolled
        • Add a new Trusted Device
        • Remove Trusted Device
        • Customization
      • Sign In with Email/Phone Number
      • Biometric/Pin
        • Advanced Methods
        • Customization
        • Setting Strings
        • Styling
      • Older SDK Version
        • Sign In with Device
          • Authenticate from a Non-Trusted Device
    • Python (for CLI)
    • API for Other Mobile Apps or CLI
      • Verify Email/Phone Number
        • Handling URL Scheme
    • Backend: Handling Response
  • 🛡️ Protecting Your Account
    • Only Allow Your Website/App to Use Your API Key
    • Rate Limit
    • Enable reCAPTCHA to Protect Against Automated Abuse
  • 🗝️ Getting Access Token
    • Cotter's OAuth 2.0 Tokens Specification
    • Getting the Tokens
      • Get Tokens during Authentication
      • Using the Refresh Token
    • Storing and Removing Tokens
    • Renewing Expired Tokens
    • Verifying JWT Tokens
    • Requesting Custom Fields on your JWT Token
    • Older API
      • Using HTTP Requests
      • Getting the Tokens
        • During Authentication
          • During Email/Phone Verification
        • During enrolling Trusted Devices
  • 🔌API Reference
    • User API
      • User Object
    • OAuth Tokens API
      • Verify JWT Token using API (serverless)
      • Requesting Custom Claims on your Access Token
      • Older API
    • OAuth Tokens from Social Login
    • Event Object
    • Reset PIN API
  • Older API
    • Validating Cotter's Identity Token
    • Validating Cotter's Event Response
Powered by GitBook
On this page
  1. SDK Reference
  2. Android
  3. Biometric/Pin

Setting Strings

Make sure you are using version >= 0.4.3

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:

Cotter.strings.set___<ScreenName>___Strings(Strings.__<ElementName>__, <ValueYouWant>)

For example, if you want to update the Title to "Enter PIN":

Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.Title, "Enter PIN");

Full list of the API to change strings:

// Headers
Cotter.strings.setHeaders(ScreenNames.PinEnrollmentEnterPin, "Activate Pin");
Cotter.strings.setHeaders(ScreenNames.PinEnrollmentReEnterPin, "Confirm Pin");
Cotter.strings.setHeaders(ScreenNames.PinVerification, "Verify Pin");
Cotter.strings.setHeaders(ScreenNames.PinChangeVerifyPin, "Change Pin");
Cotter.strings.setHeaders(ScreenNames.PinChangeEnterPin, "Enter New Pin");
Cotter.strings.setHeaders(ScreenNames.PinChangeReEnterPin, "Confirm New Pin");
Cotter.strings.setHeaders(ScreenNames.RegisterDeviceQRScanner, "Scan QR Code");
Cotter.strings.setHeaders(ScreenNames.RegisterDeviceQRShow, "");
Cotter.strings.setHeaders(ScreenNames.PinReset, "Forgot Pin");
Cotter.strings.setHeaders(ScreenNames.PinResetEnterPin, "Enter New Pin");
Cotter.strings.setHeaders(ScreenNames.PinResetReEnterPin, "Confirm New Pin");
        
// Pin Enrollment Default Strings
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.Title, "Enter Pin");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.ErrorCombination, "Your PIN is weak. Please enter a stronger PIN.");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.DialogTitle, "Are you sure you don't want to setup PIN?");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.DialogSubtitle, "Setting up your PIN is important to secure your account.");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.DialogPositiveButton, "Setup PIN");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.DialogNegativeButton, "Next Time");

Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.Title, "Re-Enter Pin");
Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.ErrorNoMatch, "Your PIN doesn't match your previous PIN.");
Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.ErrorOther, "Something went wrong.");

Cotter.strings.setPinEnrollmentSuccessStrings(Strings.Title, "Successfully Activated PIN");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.Subtitle, "You can now use your PIN to unlock your account and make transactions");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.ButtonText, "Done");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.BiometricTitle, "Biometric Verification");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.BiometricSubtitle, "Protect your account using Biometrics");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.BiometricNegativeButton, "Cancel");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.DialogTitle, "Something went wrong");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.DialogSubtitle, "You may have already enrolled Biometrics before.");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.DialogPositiveButton, "Skip this step");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.DialogNegativeButton, "Try Again");

// Pin Verification default strings
Cotter.strings.setPinVerificationStrings(Strings.Title, "Enter Pin");
Cotter.strings.setPinVerificationStrings(Strings.ForgotPin, "Forgot Pin");
Cotter.strings.setPinVerificationStrings(Strings.ErrorInvalid, "Your PIN is invalid");
Cotter.strings.setPinVerificationStrings(Strings.ErrorOther, "Something went wrong.");
Cotter.strings.setPinVerificationStrings(Strings.BiometricTitle, "Verify Biometric");
Cotter.strings.setPinVerificationStrings(Strings.BiometricSubtitle, "Verify your biometric to continue");
Cotter.strings.setPinVerificationStrings(Strings.BiometricNegativeButton, "Input Pin");
Cotter.strings.setPinVerificationStrings(Strings.DialogTitle, "Unable to verify biometric");
Cotter.strings.setPinVerificationStrings(Strings.DialogSubtitle, "Do you want to try again or enter pin instead?");
Cotter.strings.setPinVerificationStrings(Strings.DialogPositiveButton, "Input PIN");
Cotter.strings.setPinVerificationStrings(Strings.DialogNegativeButton, "Try Again");

// Pin Change default strings
Cotter.strings.setPinChangeVerifyPinStrings(Strings.Title, "Enter Current Pin");
Cotter.strings.setPinChangeVerifyPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinChangeVerifyPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinChangeVerifyPinStrings(Strings.ErrorInvalid, "Your PIN is invalid");
Cotter.strings.setPinChangeVerifyPinStrings(Strings.ErrorOther, "Something went wrong");

Cotter.strings.setPinChangeEnterPinStrings(Strings.Title, "Enter New Pin");
Cotter.strings.setPinChangeEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinChangeEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinChangeEnterPinStrings(Strings.ErrorCombination, "Your PIN is weak. Please enter a stronger PIN.");
Cotter.strings.setPinChangeEnterPinStrings(Strings.DialogTitle, "Are you sure you don't want to setup your new PIN?");
Cotter.strings.setPinChangeEnterPinStrings(Strings.DialogSubtitle, "You will be able to use your old PIN if you don't setup a new PIN.");
Cotter.strings.setPinChangeEnterPinStrings(Strings.DialogPositiveButton, "Setup New PIN");
Cotter.strings.setPinChangeEnterPinStrings(Strings.DialogNegativeButton, "Next Time");

Cotter.strings.setPinChangeReEnterPinStrings(Strings.Title, "Re-Enter New Pin");
Cotter.strings.setPinChangeReEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinChangeReEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinChangeReEnterPinStrings(Strings.ErrorNoMatch, "Your PIN doesn't match your previous PIN.");

Cotter.strings.setPinChangeSuccessStrings(Strings.Title, "Successfully Change PIN");
Cotter.strings.setPinChangeSuccessStrings(Strings.Subtitle, "You can now use your new PIN to unlock your account and make transactions");
Cotter.strings.setPinChangeSuccessStrings(Strings.ButtonText, "Done");

// Enable Disable Biometric
Cotter.strings.setBiometricChangeStrings(Strings.BiometricTitle, "Biometric Verification");
Cotter.strings.setBiometricChangeStrings(Strings.BiometricSubtitle, "Protect your account using Biometrics");
Cotter.strings.setBiometricChangeStrings(Strings.BiometricNegativeButton, "Cancel");
Cotter.strings.setBiometricChangeStrings(Strings.DialogTitle, "Something went wrong");
Cotter.strings.setBiometricChangeStrings(Strings.DialogSubtitle, "You may have already enrolled Biometrics before.");
Cotter.strings.setBiometricChangeStrings(Strings.DialogDisabledSubtitle, "You may not have Biometrics enrolled.");
Cotter.strings.setBiometricChangeStrings(Strings.DialogPositiveButton, "Cancel");
Cotter.strings.setBiometricChangeStrings(Strings.DialogNegativeButton, "Try Again");

// Network Error Dialog
Cotter.strings.setNetworkErrorStrings(Strings.DialogTitle, "Connection Lost");
Cotter.strings.setNetworkErrorStrings(Strings.DialogSubtitle, "Please establish a stronger internet connection and try again.");
Cotter.strings.setNetworkErrorStrings(Strings.DialogPositiveButton, "Try Again");

// HTTP Error Dialog (Not Used)
Cotter.strings.setHttpErrorStrings(Strings.DialogTitle, "Something went wrong");
Cotter.strings.setHttpErrorStrings(Strings.DialogSubtitle, "Looks like there's an error on our end. Please try again.");
Cotter.strings.setHttpErrorStrings(Strings.DialogPositiveButton, "Try Again");

// Approve login from Non-Trusted Device
Cotter.strings.setApproveRequestStrings(Strings.Title, "Are you trying to sign in?");
Cotter.strings.setApproveRequestStrings(Strings.Subtitle, "Someone is trying to sign in to your account from another device.");
Cotter.strings.setApproveRequestStrings(Strings.ButtonYes, "Yes");
Cotter.strings.setApproveRequestStrings(Strings.ButtonNo, "No, it's not me");

// Request Auth
Cotter.strings.setRequestAuthStrings(Strings.DialogTitle, "Approve this login from your phone");
Cotter.strings.setRequestAuthStrings(Strings.DialogSubtitle, "A notification is sent to your trusted device to confirm it's you.");
Cotter.strings.setRequestAuthErrorStrings(Strings.DialogTitle, "Something went wrong");
Cotter.strings.setRequestAuthErrorStrings(Strings.DialogSubtitle, "We're unable to confirm that it's you. Please try again.");

// Success Sheet
Cotter.strings.setSuccessSheetStrings(Strings.DialogTitle, "Success Registering New Device");
Cotter.strings.setSuccessSheetStrings(Strings.DialogSubtitle, "You can now use your new device to access your account without approval.");
Cotter.strings.setSuccessSheetErrorStrings(Strings.DialogTitle, "Unable to Register New Device");
Cotter.strings.setSuccessSheetErrorStrings(Strings.DialogSubtitle, "Please try again.");

// QR Code Show
Cotter.strings.setQRCodeShowStrings(Strings.Title, "Register this Device");
Cotter.strings.setQRCodeShowStrings(Strings.Subtitle, "Please scan this QR Code from a Trusted Device.");
Cotter.strings.setQRCodeShowErrorStrings(Strings.Title, "Something went wrong");
Cotter.strings.setQRCodeShowErrorStrings(Strings.Subtitle, "The request timed out. Please try again.");

// Reset Pin
Cotter.strings.setPinResetStrings(Strings.Title, "Verification Code");
Cotter.strings.setPinResetStrings(Strings.Subtitle, "We have sent a code to");
Cotter.strings.setPinResetStrings(Strings.ResendCode, "Resend Code");
Cotter.strings.setPinResetStrings(Strings.ErrorInvalid, "The code you entered is invalid");
Cotter.strings.setPinResetStrings(Strings.ErrorOther, "Something went wrong");

Cotter.strings.setPinResetEnterPinStrings(Strings.Title, "Enter New Pin");
Cotter.strings.setPinResetEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinResetEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinResetEnterPinStrings(Strings.ErrorCombination, "Your PIN is weak. Please enter a stronger PIN.");
Cotter.strings.setPinResetEnterPinStrings(Strings.DialogTitle, "Are you sure you don't want to setup your new PIN?");
Cotter.strings.setPinResetEnterPinStrings(Strings.DialogSubtitle, "You will be able to use your old PIN if you don't setup a new PIN.");
Cotter.strings.setPinResetEnterPinStrings(Strings.DialogPositiveButton, "Setup New PIN");
Cotter.strings.setPinResetEnterPinStrings(Strings.DialogNegativeButton, "Next Time");

Cotter.strings.setPinResetReEnterPinStrings(Strings.Title, "Re-Enter New Pin");
Cotter.strings.setPinResetReEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinResetReEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinResetReEnterPinStrings(Strings.ErrorNoMatch, "Your PIN doesn't match your previous PIN.");

Cotter.strings.setPinResetSuccessStrings(Strings.Title, "Successfully made a new Pin");
Cotter.strings.setPinResetSuccessStrings(Strings.Subtitle, "You can now use your new PIN to unlock your account");
Cotter.strings.setPinResetSuccessStrings(Strings.ButtonText, "Done");
PreviousCustomizationNextStyling

Last updated 4 years ago

📘