Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24808] iOS 11 / Android O: Add support for Password AutoFill

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-10-16T21:01:41.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.3.0
ComponentsAndroid, iOS
Labelsios11
ReporterVijay Singh
AssigneeGary Mathews
Created2017-06-12T03:25:55.000+0000
Updated2018-08-20T10:21:04.000+0000

Description

iOS 11 offers new feature Password AutoFill, that makes logging in easy by putting users password directly on keyboard in login UI. This can be done by supporting UITextContentType in UITextField and UITextView. For detail follow apple wwdc video : https://developer.apple.com/videos/play/wwdc2017/206 .

Comments

  1. Vijay Singh 2017-07-10

    PR: https://github.com/appcelerator/titanium_mobile/pull/9210 Test Case 1 (Password auto fill)-
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var userNameField = Ti.UI.createTextField({
       top: 100,
       width: 150,
       hintText:'User Name...',
       autofillType:Titanium.UI.AUTOFILL_TYPE_USER_NAME,
       backgroundColor:'red'
       });
       
       var passwordField = Ti.UI.createTextField({
       top: 200,
       width: 150,
       hintText:'Password...',
       autofillType:Titanium.UI.AUTOFILL_TYPE_PASSWORD,
       backgroundColor:'red'
       });
       
       win.add(userNameField);
       win.add(passwordField);
       
       win.open();
       
    Test Case 2 (Other text content type properties, given by apple, in iOS 10 )-
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var creditCardField = Ti.UI.createTextArea({
       top: 100,
       width: 150,
       backgroundColor:'red'
       });
       
       creditCardField.setAutofillType(Titanium.UI.AUTOFILL_TYPE_CARD_NUMBER);// Open keyboard with number pad
       Ti.API.info(Titanium.UI.AUTOFILL_TYPE_NAME);
       Ti.API.info(Titanium.UI.AUTOFILL_TYPE_ORGANIZATION_NAME);
       win.add(creditCardField);
       win.open();
       
    *+Note 1 -+* For testing test case 1, one need to make few configurations . This is explained in apple video link mentioned in ticket. *+Note 2 -+* This ticket has been used to implement the other text content type properties, which are already given by apple in iOS 10 also. Test case 2 is for this.
  2. Hans Knöchel 2017-07-20

    We discussed this yesterday and found out that Android has an Autofill-API in Android O as well. So we will wait for parity here before doing iOS.
  3. Gary Mathews 2017-08-29

    Here's the autofill hints for Android
       AUTOFILL_HINT_USERNAME = UITextContentTypeUsername
       AUTOFILL_HINT_PASSWORD = UITextContentTypePassword
       AUTOFILL_HINT_EMAIL_ADDRESS = UITextContentTypeEmailAddress
       AUTOFILL_HINT_NAME = UITextContentTypeName
       AUTOFILL_HINT_PHONE = UITextContentTypeTelephoneNumber
       AUTOFILL_HINT_POSTAL_ADDRESS = UITextContentTypeFullStreetAddress
       AUTOFILL_HINT_POSTAL_CODE = UITextContentTypePostalCode
       AUTOFILL_HINT_CREDIT_CARD_NUMBER = UITextContentTypeCreditCardNumber
       AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE
       AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE
       AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY
       AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH
       AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR
       
  4. Gary Mathews 2017-08-30

    master: https://github.com/appcelerator/titanium_mobile/pull/9368
  5. Gary Mathews 2017-09-22

    6_3_X: https://github.com/appcelerator/titanium_mobile/pull/9472
  6. Lokesh Choudhary 2017-10-13

    FR passed for master & backport PR for Android.
  7. Lokesh Choudhary 2017-10-26

    Verified the fix for android in SDK 6.3.0.v20171026120401 & 7.0.0.v20171025141436. [~ewieber], please close the ticket when IOS verification is done. Studio Ver: 4.10.0.201709271713 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.10-2 Appc CLI: 6.3.0-master.15 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.6 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Devices: ⇨ Nexus 6P -- Android 8.0
  8. Rakhi Mitro 2018-08-20

    [~lchoudhary], We tested the Password AutoFill option on Android. We got two different behaviour. *Autofill* is working as expected on Android 8 , Samsung j7 device. But using Android 8.1 device the *Autofill* is not working on customer’s end. We got the same behaviour also on Android 8(Huawei y9 2018) device. *Test Enviornment:*
       Axway Appcelerator Studio, build: 5.1.0.201808080937
       Appcelerator Command-Line Interface, version 7.0.4
       Operating System
         Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 8589934592
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 = 7.2.0.GA
       Device: android 8(Huawei y9 2018)
       
       
    *Test steps*: * Go to device’s settings and enable the auto fill option. * Build the sample code. after app launch, click on the textfield * Here autofill doesn’t prompt me to select google account. *Test code:*
       var win = Ti.UI.createWindow({backgroundColor: 'gray', layout: 'vertical'}),
       	usr = Ti.UI.createTextField({
       		width: Ti.UI.FILL,
       		hintText: 'USERNAME',
       		autofillType: Titanium.UI.AUTOFILL_TYPE_USERNAME
       	}),
       	pwd = Ti.UI.createTextField({
       		width: Ti.UI.FILL,
       		hintText:'PASSWORD',
       		autofillType: Titanium.UI.AUTOFILL_TYPE_PASSWORD
       	});
       
       win.add(usr);
       win.add(pwd);
       
       win.open();
       
    Test output: [Screenshot](https://downloads.intercomcdn.com/i/o/72221621/3a86d1617642f4d1fd06cfb0/Screenshot_20180816-145108.jpg) Can you please double check this?

JSON Source