Search code examples
androidandroid-8.0-oreoandroid-settingsandroid-autofill-manager

How to get the user to auto fill framework setting screen pro-grammatically in android 8.0


I want to get the user to auto-fill framework settings screen to enable the AutoFill framework to auto-fill the login form in third-party apps.

So, how can I get the user programmatically to the auto-fill settings screen in Oreo devices?


Solution

  • After a long search i have found answer from gitup projects.

    The code to get the user to auto fill settings screen pro-grammatically is below

       if (mAutofillManager != null && !mAutofillManager.hasEnabledAutofillServices()) {
            Intent intent = new Intent(Settings.ACTION_REQUEST_SET_AUTOFILL_SERVICE);
            intent.setData(Uri.parse("package:com.example.android"));
            startActivityForResult(intent, REQUEST_CODE_SET_DEFAULT);
        }