Connecting/disconnecting Bluetooth keyboard causes Android app to restart

Steps to reproduce

  1. Open Obsidian Android app
  2. Connect a Bluetooth keyboard to the Android device
  3. Obsidian app restarts from splash screen
  4. Disconnect the Bluetooth keyboard
  5. Again, the Obsidian app restarts from splash screen

Expected result

App window should remain unchanged when an external Bluetooth keyboard is connected or disconnected.

Actual result

Obsidian Android app restarts from its splash screen whenever a Bluetooth keyboard is connected or disconnected while using the app.

Environment

  • Operating system: Android 10
  • Obsidian version: 1.0.5

Additional information

I suspect this is related to the Android app’s manifest not being registered to handle “keyboard” configuration changes. By default, Android classifies connecting/disconnecting an external keyboard as a config change and fires the app’s onCreate method. See:

My workflow involves switching my keyboard frequently between my main PC and Obsidian on my Android tablet, but because the app restarts whenever I switch it’s rather clunky in practice.

Would like to respond to let the developers know that I have the same workflow as @lemonlime and also experience the restarting of obsidian when (dis)connecting my BT keyboard. I volunteer to help in the testing if needed.

device: Galaxy Tab A7 Lite
Keyboard: Keychron k7
android: 11
obsidian: 1.3.0

1 Like