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.

2 Likes

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

2 Likes

Having the same issue, but it also happens when a physical keyboard is disconnected that is connected to the accessory port on my device.

Possibly issue with app configuration,

Stack Overflow: Activity restarts when switching between virtual and physical keyboard

refers to this type of issue but 7+ years ago, and its not exactly the same.

Device: Samsung Galaxy Tab S7+
OS: Android 12
Obsidian Version: 1.4.1
Keyboard: Logitech G613, Samsung Book Cover Keyboard

1 Like

Same issue here! I’d like to have a workflow of switching between my laptop and eink tablet for notetaking but the reload is quite annoying.

Device: Onyx Boox Leaf 2
OS: Android 11
Obsidian Version: 1.4.1
Keyboard: Keychron K2

I think the issue is probably bigger than Obsidian. Web pages on Android will reload when you disconnect a keyboard – even if you have unsaved information on the page!

It is an app-specific issue. Android triggers every app to restart(recreate activity) on a configuration change. Obsidian mobile app should handle the keyboard change to continue activity without restarting it…

1 Like

will be fixed in v1.4.4+

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.