-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android 11 inline autofill #1145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor feedback on simplifying one of the blocks, but otherwise looks good!
if (inlinePresentationSpecs != null) | ||
{ | ||
inlinePresentationSpecsCount = inlinePresentationSpecs.Count; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block can be simplified:
inlineMaxSuggestedCount = fillRequest.InlineSuggestionsRequest?.MaxSuggestionCount ?? 0;
inlinePresentationSpecsCount = inlineSuggestionsRequest?.InlinePresentationSpecs?.Count ?? 0;
if (fillRequest != null) | ||
{ | ||
if ((int)Build.VERSION.SdkInt >= 30) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can also combine these conditions together in one if
Should this also work on Samsung's Android 11? |
There's no reason it shouldn't, however in the end that's up to Samsung. |
I just verified that it indeed works! Although, only on Chrome, and using the Samsung keyboard stock keyboard. |
For anyone using Brave, it seems to be working when all three of Brave's autofill features are disabled (passwords, payment methods, and Addresses). Just FYI. |
@mportune-bw Unfortunately, that doesn't fix the issue for Brave. It doesn't seem to work 90% of the time. I'm almost certain it's not code related. This has been an ongoing issue with Chromium browsers on Android, even before the new Android 11 keyboard auto fill API. Looks like someone submitted patches for this issue: #489 (comment) |
@wallismith Sorry to hear that. Autofill can be incredibly frustrating since there are so many moving parts outside of our control. Just curious what device are you testing with? (I'm on a Pixel 4a) |
@mportune-bw I'm on a Pixel 3 using Gboard. |
Does this work with OpenBoard ,FlorisBoard ,AnySoftKeyboard or any other FOSS keyboard ? |
@bingoxo I could only see it working on Gboard and Samsung keyboard. |
Support for Android 11 inline autofill. If a fill request includes an
InlineSuggestionsRequest
(requires Android 11 plus an IME (keyboard) that supports inline presentations) then we construct the additional views according to the given restrictions (dictated by the IME within the request) and returned along with the original overlay views. The result is a horizontally-scrollable collection of ciphers anchored within the IME. The original overlay is used if noInlineSuggestionsRequest
is supplied, or if anything goes wrong during the creation of the inline presentation.Some tidbits:
InlineSuggestionsRequest
to allow the IME to drive the theme.