Disabling Android O Auto-Fill Service for an Application

Disabling Android O auto-fill service for an application

Is it possible ?

Not that I am aware of. Certainly, nothing is documented.

Is there any better method than this ?

Not that I am aware of.

How to disable the new Autofill feature from Android Oreo for espresso tests

adb shell pm disable com.google.android.gms/com.google.android.gms.autofill.service.AutofillService

This should disable the autofill service. It is same as turning off autofill service in the system settings manually. It at least worked on the emulator. But this needs root access.

Another way to disable the autofill service is to change the autofill_service settings.

adb shell settings put secure autofill_service null

Allow to disable Oreo Autofill service for a package

setIgnoredIds() should be used for fields that are not autofillable (for example, if the screen had an username, password, and captcha fields, you could use to ignore the latter).

If you want to disable autofill for the activity, you need to return a Fillresponse with just the [disableAutofill()][1] set on it. Notice that disabling it doesn't persist after reboots, so you should keep track of it internally, and call that API if the activity triggers autofill again.



Related Topics



Leave a reply



Submit