public class AuthenticationParameter extends Object
Constructor and Description |
---|
AuthenticationParameter(Activity activity,
String title,
String subTitle,
String description,
String negativeBtnText,
DeviceAuthenticationCallback callback)
Construct the authentication params object
|
Modifier and Type | Method and Description |
---|---|
Activity |
getActivity()
Retrieve the host activity of the payment transaction
|
DeviceAuthenticationCallback |
getCallback()
Retrieve the authentication callback
|
String |
getDescription()
Retrieve the custom description of the authentication screen
|
String |
getNegativeButtonText()
Retrieve the custom negative button of the authentication screen
|
String |
getSubTitle()
Retrieve the custom sub-title of the authentication screen
|
String |
getTitle()
Retrieve the custom title of the authentication screen
|
VerificationMethod |
getVerificationMethod()
Retrieve the expected verification method (if there is any)
|
void |
setVerificationMethod(VerificationMethod method)
Set the expected verification method for this authentication.
|
public AuthenticationParameter(@NonNull Activity activity, @NonNull String title, @NonNull String subTitle, @NonNull String description, @NonNull String negativeBtnText, @NonNull DeviceAuthenticationCallback callback)
activity
- The host activity where the authentication happeningtitle
- The title to display on the system authentication screensubTitle
- The sub-title to display on the system authentication screendescription
- The description displaying on the system authentication screennegativeBtnText
- The negative button to show on system authentication screencallback
- The callback to know the status of the authenticate@NonNull public Activity getActivity()
@NonNull public DeviceAuthenticationCallback getCallback()
@NonNull public String getTitle()
@NonNull public String getSubTitle()
@NonNull public String getDescription()
@NonNull public String getNegativeButtonText()
public void setVerificationMethod(@NonNull VerificationMethod method)
By default, the verification method is decided internally by the D1Pay.
This API provides an option for the mobile app to fallback to other authentication method
(example fallback to VerificationMethod.DEVICE_KEYGUARD
if VerificationMethod.BIOMETRICS
is not working.
method
- The expected verification method@Nullable public VerificationMethod getVerificationMethod()