How to build an app supporting 1Password?
Hi, I'm an Android Developer
I found my company's app doesn't support 1Password well, so I do some tests.
I build an app like below
with layout xml
```
<?xml version="1.0" encoding="utf-8"?>
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<EditText
android:id="@+id/emailEditText"
android:layout_width="match_parent"
android:layout_height="150dp"
android:autofillHints="username"
android:inputType="textEmailAddress"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/passwordEditText"
android:layout_width="match_parent"
android:layout_height="150dp"
android:autofillHints="password"
android:inputType="textPassword"
app:layout_constraintTop_toBottomOf="@+id/emailEditText" />
```
This is my 1Password settings for this app
Even though I have set the autofillHints for emailEditText to "username", 1Password still cannot autofill the field.
But passwordEditText
works
And only fill passwordEditText
When I change first EditText's id from emailEditText
to usernameEditText
, it works perfectly
````
<?xml version="1.0" encoding="utf-8"?>
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<EditText
android:id="@+id/usernameEditText"
android:layout_width="match_parent"
android:layout_height="150dp"
android:autofillHints="username"
android:inputType="textEmailAddress"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/passwordEditText"
android:layout_width="match_parent"
android:layout_height="150dp"
android:autofillHints="password"
android:inputType="textPassword"
app:layout_constraintTop_toBottomOf="@+id/usernameEditText" />
````
I'm not sure why it's based on the View's ID instead of the autofillHints.
And I do another test, I adding an EditText which id is emailEditText
like below
```
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<EditText
android:id="@+id/userNameEditText"
android:layout_width="match_parent"
android:layout_height="150dp"
android:autofillHints="username"
android:inputType="text"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/passwordEditText"
android:layout_width="match_parent"
android:layout_height="150dp"
android:autofillHints="password"
android:inputType="textPassword"
app:layout_constraintTop_toBottomOf="@+id/userNameEditText" />
<EditText
android:id="@+id/emailEditText"
android:layout_width="match_parent"
android:layout_height="150dp"
android:autofillHints="emailAddress"
android:inputType="textEmailAddress"
app:layout_constraintTop_toBottomOf="@+id/passwordEditText" />
```
Both userNameEditText
and emailEditText
are not working
Do I miss something? Thanks~
1Password Version: 8.10.4
Extension Version: Not Provided
OS Version: Android 13, Android 10
Browser:_ Not Provided