Android Question [B4A] PromptInfoBuilder As JavaObject

T201016

Active Member
Licensed User
Longtime User
Hi,
How can I change the underlined red line in the image extra line of text,
into English? - just like I did with the title and button text (see lines 8 and 9 of the code).

Is there another method without interfering with library sources?

B4XBiometricManager:
Private biometric As B4XBiometricManager

biometric.Show("Please authenticate","Authorization PIN Code")

Public Sub Show (Msg As String, NegativeButtonText As String)
    Dim PromptInfoBuilder As JavaObject
    PromptInfoBuilder.InitializeNewInstance("androidx.biometric.BiometricPrompt$PromptInfo$Builder", Null)
    PromptInfoBuilder.RunMethod("setTitle", Array(Msg))
    PromptInfoBuilder.RunMethod("setNegativeButtonText", Array As String(NegativeButtonText))
    Dim Ev As JavaObject
    Ev.InitializeNewInstance(Application.PackageName & ".b4xbiometricmanager.BiometricPromptAuthentication", Array(Me))
    Dim Prompt As JavaObject
    Prompt.InitializeNewInstance("androidx.biometric.BiometricPrompt", Array(ctxt, Executor, Ev))
    Prompt.RunMethod("authenticate", Array(PromptInfoBuilder.RunMethod("build", Null)))
End Sub

ScreenShot00021.png
 

T201016

Active Member
Licensed User
Longtime User
This text will be localized based on the device locale.
Thank you for your reaction @Erel
but i think i found a solution. The following information helped: developer
setDescription(@Nullable CharSequence description)
Optional: Sets the description for the prompt.

setNegativeButtonText(@NonNull CharSequence negativeButtonText)
Required: Sets the text for the negative button on the prompt.

setSubtitle(@Nullable CharSequence subtitle)
Optional: Sets the subtitle for the prompt.

setTitle(@NonNull CharSequence title)
Required: Sets the title for the prompt.
I just need to check it in my code yet.
 
Upvote 0

T201016

Active Member
Licensed User
Longtime User
Yes, you are indeed right it is based on the device. I thought the other subtitles, ... refer to this baseline.
 
Upvote 0
Top