diff --git a/android/src/main/java/ee/forgr/biometric/NativeBiometric.java b/android/src/main/java/ee/forgr/biometric/NativeBiometric.java index 1a686e6f..57907219 100644 --- a/android/src/main/java/ee/forgr/biometric/NativeBiometric.java +++ b/android/src/main/java/ee/forgr/biometric/NativeBiometric.java @@ -282,8 +282,10 @@ public void setCredentials(final PluginCall call) { intent.putExtra("username", username); intent.putExtra("password", password); intent.putExtra("accessControl", accessControl); - intent.putExtra("title", "Protect Credentials"); - intent.putExtra("negativeButtonText", "Cancel"); + + intent.putExtra("title", call.getString("title", "Protect Credentials")); + intent.putExtra("negativeButtonText", call.getString("negativeButtonText", "Cancel")); + startActivityForResult(call, intent, "setSecureCredentialsResult"); } else { try { diff --git a/src/definitions.ts b/src/definitions.ts index 2e4d1928..7b43cf0e 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -162,6 +162,16 @@ export interface SetCredentialOptions { * @since 8.4.0 */ accessControl?: AccessControl; + /** + * Title for the biometric prompt. + * Only for Android. + */ + title?: string; + /** + * Text for the negative/cancel button. + * Only for Android. + */ + negativeButtonText?: string; } export interface GetSecureCredentialsOptions {