https://kotlinlang.org logo
#compose
Title
# compose
f

francisco

02/13/2023, 10:48 PM
I had a question, slightly related to compose, but could probably be posted on #android. Is there a secure input textfield on android/jetpack compose? iOS SwiftUI has a
SecureField
https://developer.apple.com/documentation/swiftui/securefield
h

hfhbd

02/13/2023, 10:49 PM
Copy code
TextField(
        value = value,
        onValueChange = onValueChange,
        visualTransformation = PasswordVisualTransformation()
    )
s

Stylianos Gakis

02/13/2023, 10:51 PM
Also it really depends on what SecureField does. Is it only a visual change, or does it also do stuff like not allow clipboard copy/pasting and other special stuff?
c

Chris Fillmore

02/14/2023, 3:41 AM
I’d bet SecureField also hides the keyboard/input when doing a screen capture/share
(Not an iOS developer but I’ve seen iOS do this)
p

Pete Doyle

02/14/2023, 3:58 AM
I was recently looking at
SecureField
and I think it also tries to prevent other programs from programmatically watching keystrokes (which is a surprisingly valid thing to do for accessibility, hotkey managers, etc.) The overall goal was to prevent key loggers (and yeah, probably screen recording?) from recording passwords, etc. Combined with Apple silicon no longer allowing kexts by default, and System Integrity Protection, seemed like they could actually provide some pretty strong guarantees that no one else could watch keyboard entry into those fields. (I'm also curious about this for Android)
e

ephemient

02/14/2023, 4:24 AM
sounds challenging given that keyboards are separate apps that you can't provide any guarantees about
some other features mentioned are filed, https://issuetracker.google.com/issues/173016926
9 Views