me.apla.cordova.app-preferences
me.apla.cordova.app-preferences copied to clipboard
Secure/password field
You currently have, in mappings.js:
// need a different handling for ios and android
// IsSecure
I have tried this, and although it is picking up the field for the preferences, it isn't picking up the password field
password: {
ios: "PSTextFieldSpecifier",
android: "EditTextPreference",
types: "string",
required: ["key"],
attrs: {
keyboard: {
android: "@android:inputType",
ios: "KeyboardType",
value: {
// Alphabet , NumbersAndPunctuation , NumberPad , URL , EmailAddress
// text, number, textUri, textEmailAddress
// ios: https://developer.apple.com/library/ios/documentation/PreferenceSettings/Conceptual/SettingsApplicationSchemaReference/Articles/PSTextFieldSpecifier.html#//apple_ref/doc/uid/TP40007011-SW1
// android is little weird http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType
number: {ios: "NumberPad", android: "number"},
text: {ios: "Alphabet", android: "text"},
uri: {ios: "URL", android: "textUri"},
email: {ios: "EmailAddress", android: "textEmailAddress"}
}
},
password: {
android: "@android:password",
ios: "IsSecure",
value: {ios: "true", android: "true"}
},
key: commonMappings.key,
title: commonMappings.title,
default: commonMappings.default,
}
},
Any ideas or external progress on this? Thanks heaps!
I do need to know about this as well - any suggestion how to solve this?
Fixed it like this (tested on android):
password: {
ios: "PSTextFieldSpecifier",
android: "EditTextPreference",
types: "string",
required: ["key"],
attrs: {
keyboard: {
android: "@android:inputType",
ios: "KeyboardType",
value: {
// Alphabet , NumbersAndPunctuation , NumberPad , URL , EmailAddress
// text, number, textUri, textEmailAddress
// ios: https://developer.apple.com/library/ios/documentation/PreferenceSettings/Conceptual/SettingsApplicationSchemaReference/Articles/PSTextFieldSpecifier.html#//apple_ref/doc/uid/TP40007011-SW1
// android is little weird http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType
number: {ios: "NumberPad", android: "number"},
text: {ios: "Alphabet", android: "text"},
uri: {ios: "URL", android: "textUri"},
email: {ios: "EmailAddress", android: "textEmailAddress"}
}
},
password: {
android: "@android:password",
ios: "IsSecure",
value: {
"true": {ios: "true", android: "true"}
}
},
key: commonMappings.key,
title: commonMappings.title,
default: commonMappings.default,
}
},
thx. Tested successfully on iOS 11. Use Yes, instead of true for the IsSecure flag.
password: {
android: "@android:password",
ios: "IsSecure",
value: {
"true": {ios: "Yes", android: "true"}
}
},
@billylo1 Can you share the complete field definition, i'm triying last comment in IOS 11 and is not working. thanks.
I ended up enhancing the iOS plugin myself to support the password type.
[
{
"type": "group",
"title": "Accounts",
"items": [
{
"title": "User ID",
"type": "textfield",
"key": "userid"
},
{
"title": "Password",
"type": "textfield",
"key": "password",
"password": "true"
}
]
}
]
thanks a lot.