天道酬勤,学无止境

android-autofill-manager

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

Question Running tests on android devices with sdk 26 causes them to fail because of the new Autofill feature that hides the fields when espresso are trying to click them. Im running my tests on firebase test lab so I cannot disable them manually on my tests devices. Some images: 1. Password is visible before clicking username field. 2. After clicking username field password field is hidden by this Autofill dialog: 3. After login it shows another Fill dialog: Espresso cant click now password field since the autofill dialog is hiding my field and fail. Using AutofillManager

2021-10-19 16:21:27    分类:技术分享    android   testing   android-espresso   android-testing   android-autofill-manager

Disabling Android O auto-fill service for an application

Question Android O has the feature to support Auto-filling for fields. Is there any way I can disable it for a specific application. That is I want to force my application not to use the auto-fill service. Is it possible ? To block autofill for an entire activity, use this in onCreate() of the activity: getWindow() .getDecorView() .setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS); Is there any better method than this ? Answer1 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

2021-04-19 02:11:12    分类:技术分享    android   textview   autofill   android-8.0-oreo   android-autofill-manager