Do not DynamicKeyboard show asterisks when asking for a password?

Hi to all

I am developing a channel on which I need to login our users.

The problem see is that the DynamicKeyboard (or any keyboard) does not show asterisks (*) when we are asking for passwords. The password is shown in plain text in the textEditBox.

I have tried to use the keyboardDomain in the DynamicKeyboard and set it to “password” but it still don’t work.

All passwords are shown and this is not good for security.

Is there any way to override this behaviour ?

If so, is there any chance to have some code examples or documentation about this matter?

None of the examples I have seen the last days have this problem solved.

Thank you for some help.

Is correct that the password field content is shown in plain text?

The best way to find out is dump the component to screen.

<Component: roSGNode:VoiceTextEditBox> =
{
disableVoiceUnderscoreControl: false
isDictating: false
voiceEnabled: false
voiceEntryType: “alphanumeric”
voiceInputRegexFilter: “”
active: true
backgroundUri: “”
centerUnderscores: false
clearOnDownKey: false
cursorPosition: 0
fontSize: -1
fontUri: “”
height: -1
hintText: “”
hintTextColor: -269488282
leadingEllipsis: false
maxTextLength: 75
secureLastCharacter: false
secureMode: false
showUnderscores: false
text: “”
textColor: -269488129
width: 1368
palette: <Component: roInvalid>
childRenderOrder: “last”
clippingRect: <Component: roAssociativeArray>
enableRenderTracking: true
inheritParentOpacity: true
inheritParentTransform: true
muteAudioGuide: false
opacity: 1
renderPass: 0
renderTracking: “none”
rotation: 0
scale: <Component: roArray>
scaleRotateCenter: <Component: roArray>
translation: <Component: roArray>
visible: true
change: <Component: roAssociativeArray>
focusable: true
focusedChild: <Component: roInvalid>
id: “”
}

You want SecureMode and/or SecureLastCharacter set to true.

This doesn’t work.

Even with

secureLastCharacter = “true”
secureMode = “true”

The text keeps showing in plain mode.

This is my code:

xml:




brs:

m.customPalette = createObject(“roSGNode”, “RSGPalette”)

’ Login keyboard colours palette:
m.customPalette.colors = {
DialogBackgroundColor: “0x1A281FB0”,
DialogItemColor: “0x000000FF”,
DialogTextColor: “0xFFFFFFFF”,
DialogFocusColor: “0xFFFFFFFF”,
DialogFocusItemColor: “0x666666FF”,
DialogSecondaryTextColor: “0xFFFFFF66”,
DialogSecondaryItemColor: “0x80FFFF4D”,
DialogInputFieldColor: “0x4D4D4D80”,
DialogKeyboardColor: “0x635255A0”,
DialogFootprintColor: “0x333333FF”
}

m.loginKeyboard = m.top.findNode(“loginKeyboard”)

m.loginKeyboard.textEditBox.voiceEnabled = true

m.loginKeyboard.palette = m.customPalette
m.loginKeyboard.setFocus(true)
askForUsername()

'===============================================================

sub askForUsername()
m.usernameText = “”
m.loginKeyboard.keyboardDomain = “alphanumeric”
m.loginKeyboard.textEditBox.voiceEnabled = true
m.loginKeyboard.setFocus(true)
m.loginKeyboard.title = “Login - Informe seu nome de usuário:”
m.loginKeyboard.text = “”
m.loginKeyboard.buttons = [“OK”]
m.loginKeyboard.unobserveFieldScoped(“text”)
m.loginKeyboard.unobserveFieldScoped(“buttonSelected”)
m.loginKeyboard.observeFieldScoped(“text”, “usernameTextChanged”)
m.loginKeyboard.observeFieldScoped(“buttonSelected”, “askForPassword”)
end sub

'===============================================================

sub askForPassword()
m.usernameText = m.loginKeyboard.text
m.passwordText = “”
m.loginKeyboard.keyboardDomain = “password”
m.loginKeyboard.textEditBox.voiceEnabled = true
m.loginKeyboard.setFocus(true)
m.loginKeyboard.title = “Login - Informe sua senha:”
m.loginKeyboard.text = “”
m.loginKeyboard.buttons = [“Cancelar”, “OK”]
m.loginKeyboard.unobserveFieldScoped(“text”)
m.loginKeyboard.unobserveFieldScoped(“buttonSelected”)
m.loginKeyboard.observeFieldScoped(“text”, “passwordTextChanged”)
m.loginKeyboard.observeFieldScoped(“buttonSelected”, “onLoginButtonClicked”)
end sub

'===============================================================

StandardKeyboardDialog doesn’t have those properties.  You should have seen warnings in the debug console.  The textEditBox does.  Try:

m.loginKeyboard = m.top.findNode("loginKeyboard")
m.loginKeyboard.textEditBox.voiceEnabled = true
m.loginKeyboard.textEditBox.secureLastCharacter = true
m.loginKeyboard.textEditBox.secureMode = true

THANK you very very much renojim.

This solved the problem.

I was very disapointed as I could not find an answer and has no clue on how some interface for password could not have some secure entry.

Again, thank you.