java.lang.Object
com.thalesgroup.gemalto.fido2.authenticator.passcode.Keyboard

public abstract class Keyboard extends Object
An abstract representation of the secure keyboard used for passcode entry.

This class provides access to the keyboard's UI fragment and methods to interact with it.

Since:
1.0.0
  • Constructor Details

    • Keyboard

      public Keyboard()
  • Method Details

    • getFragment

      public abstract androidx.fragment.app.Fragment getFragment()
      Gets the secure keyboard UI as a Fragment.

      This Fragment should be displayed on the App layer to provide a secure passcode entry.

      Note: Multiple calls to this method would return the SAME object instance. A new keyboard view is only generated on the first call of the object.

      Returns:
      a Fragment containing the secure keyboard.
      Since:
      1.0.0
    • length

      public abstract int length()
      Gets the current number of digits entered on the keyboard.
      Returns:
      The length of the entered passcode.
      Since:
      1.0.0
    • clear

      public abstract void clear()
      Clears all digits currently entered on the keyboard.

      Note: This method also resets the input length to 0.

      Since:
      1.0.0
    • setCallback

      public abstract void setCallback(@Nullable KeyboardCallback callback)
      Sets the callback to receive keyboard events.
      Parameters:
      callback - The callback to listen for keyboard events, or null to remove the callback.
      Since:
      1.0.0
    • getKeyboardUsage

      public abstract KeyboardUsage getKeyboardUsage()
      Gets the current purpose of the keyboard.
      Returns:
      The current KeyboardUsage.
      Since:
      1.0.0