Class Keyboard
java.lang.Object
com.thalesgroup.gemalto.fido2.authenticator.passcode.Keyboard
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidclear()Clears all digits currently entered on the keyboard.abstract androidx.fragment.app.FragmentGets the secure keyboard UI as aFragment.abstract KeyboardUsageGets the current purpose of the keyboard.abstract intlength()Gets the current number of digits entered on the keyboard.abstract voidsetCallback(KeyboardCallback callback) Sets the callback to receive keyboard events.
-
Constructor Details
-
Keyboard
public Keyboard()
-
-
Method Details
-
getFragment
public abstract androidx.fragment.app.Fragment getFragment()Gets the secure keyboard UI as aFragment.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
Sets the callback to receive keyboard events.- Parameters:
callback- The callback to listen for keyboard events, ornullto remove the callback.- Since:
- 1.0.0
-
getKeyboardUsage
Gets the current purpose of the keyboard.- Returns:
- The current
KeyboardUsage. - Since:
- 1.0.0
-