How can I prevent this from happening, multiple users are going to use the app on the same device and I do not want all of them having access to some places
Asked
Active
Viewed 2,859 times
3
-
1Have you `android:inputType="textEmailAddress"` in your EditText? – punchman Oct 24 '18 at 05:20
-
1Check this - https://stackoverflow.com/questions/1959576/turn-off-autosuggest-for-edittext – Wasim K. Memon Oct 24 '18 at 05:28
-
I have android:inputType="textPassword" – Jesus Almaral - Hackaprende Oct 24 '18 at 18:50
3 Answers
9
You simply just add one property to your editText view
android:inputType="textPassword|textNoSuggestions"
and you are done.
if it is not working for you there is another alternative solution. You can turn off autofill programmatically.
You can try to this.
public class BaseActivity extends AppCompatActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
disableAutoFill();
}
@TargetApi(Build.VERSION_CODES.O)
private void disableAutoFill() {
getWindow().getDecorView().setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS);
}
}

Umesh Sonawane
- 517
- 6
- 17
-
a have added one more alternative solution check it. It will work – Umesh Sonawane Oct 25 '18 at 06:58
5
If none of the suggestions worked, like with me, try this as a last resort:
android:importantForAutofill="no"

JJ Du Plessis
- 1,047
- 12
- 9
-1
This worked for me https://www.addictivetips.com/android/google-autofill-settings-for-apps-android/
Disabling the autofill from Google, but I did not find how to do it just for my app

Jesus Almaral - Hackaprende
- 2,246
- 1
- 24
- 32