I’ve built an app for a client where the users have to authenticate via SSO on startup. This is done via an Android WebView, showing the SSO login screen, letting the user log in, saving all the cookies into a shared cookie jar and returning to the app.
This part works well, but now the client expressed that they want to have an auto-fill function for their login data specifically with Google Password Manager.
My problem is that Google Password Manager doesn’t even want to propose to save the password after successful login. Samsung Pass doesn’t work either. The only one that worked out of the box was KeePassDX, but I doubt I can convince my client to install it for every device just for my app.
I tried stuff like going through the settings and enabling the password manager, setting it as default, manually adding the password for my app, etc. I also tried adding the following line in the onCreate function of my WebView Activity:
getWindow().getDecorView().setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_YES);
This didn’t work either.
The phone I’m testing on (and is being used by most users) is a Samsung Galaxy A40 with Android 11, the app itself is on a work profile. Autofill is working normally in Chrome on that same work profile.
Can someone help?
1