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
Setresult Does Not Work When Back Button Pressed
Finish Parent and Current Activity in Android
Error Loading the Sdk When Eclipse Starts
How to Fix: "You Need to Use a Theme.Appcompat Theme (Or Descendant) with This Activity"
How to Create a .CSV on Android
How to Use and Style New Alertdialog from Appcompat 22.1 and Above
Generate Signed APK Android Studio
Android Studio:Unmappable Character for Encoding Utf-8
Android Webview Loading Data Performance Very Slow
Extract Code Country from Phone Number [Libphonenumber]
How to Cancel an Dialog Themed Like Activity When Touched Outside the Window
How to Remove All Listeners Added with Addtextchangedlistener
Android Resources$Notfoundexception: Resource Id #0X7F030027
Mobile Vision API - Concatenate New Detector Object to Continue Frame Processing
Cannot Enable Gradle's Offline Mode on Android Studio 3.6
What's the Difference Between Setwebviewclient VS. Setwebchromeclient