I have recently created an app which required certain security majors. One of which is that we need to stop the dialog coming from Google when a user logs into the app. The main thing is that password gets saved in google chrome. When a user comes to app again it shows options for the user to autologin with usernames in a list and adds password automatically so anyone gets access to the phone can log into the app and can steal the data.
Currently, this issue is found in only one One Plus 5 device. I want to stop this programmatically.
Any help would be appreciated,
Thanks
Update:
Thanks, Flyzzx, because of your reply I searched for android autofill and found out that it was introduced in Oreo to autofill data.
But when on the login screen it detects the username/password combo and prompts you for password save.
The solution to this is:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
AutofillManager autofillManager = getSystemService(AutofillManager.class);
autofillManager.disableAutofillServices();
editText.setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO);
}
Here, only autofillManager.disableAutofillServices();
is also sufficient but on some devices, you should also add editText.setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO);
this to work.
You have to do this for all edittexts which you don't want to get auto-filled.
Hope It will help others like me.
You simply just add one property to your editText view