Skip to content
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 - Disconnecting a USB OTG Keyboard while logging in cancels the login flow and returns to home screen. #1206

Closed
SergeantConfused opened this issue Jan 2, 2021 · 1 comment · Fixed by #1246
Assignees

Comments

@SergeantConfused
Copy link

Describe the Bug

If you use an external keyboard connected via USB OTG to enter your email and master password in the Android client, and then unplug it to connect your YubiKey, the application would go back to the first screen showing 3 buttons to Log in, Create account, or Enterprise Single Sign-On.

Steps To Reproduce

  1. Connect a keyboard via USB OTG to your Android device.
  2. Open your Bitwarden application.
  3. Enter your email and master password using the keyboard.
  4. Once you're asked to use your YubiKey, please disconnect your USB OTG keyboard.

Expected Result

To remain on the same page.

Actual Result

I'm returned to the first screen, and the login flow is cancelled.

Screenshots or Videos

N/A.

Environment

  • Device: Samsung Note 10+.
  • Operating system: Android 10.
  • Build Version: 2.7.2 (3300).
  • Is this a Beta release? N.

Additional Context

N/A.

@fpdragon
Copy link

fpdragon commented Jan 4, 2021

I debugged into it a little bit and I noticed that the method MainActivity.OnPause() and OnCreate() is triggered.
This brought me to:
Stack Overflow

"Alternatively, you can tell Android that your app will handle "keyboard" configuration changes and it will not restart your activities when the keyboard connects/disconnects. "

I am no expert in Xamarin but I guess we have to add something like:
<activity android:configChanges="keyboard" />
somehow to the AndroidManifest.xml?! O.o
Here is the Android Java description:
Click

Maybe this could help. Right now I am too confused to do it myself. xD

@eliykat eliykat self-assigned this Jan 29, 2021
@eliykat eliykat linked a pull request Jan 29, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants