Hello, i started a new Capacitor project and then i deployed it to Android and dark-mode doesn’t seem to work, it just restarts the app with no effect. Any ideas?
Capacitor is a native runtime, so Dark Mode is implemented in your web code. See here for details on how to do that.
It’s a bug on android webview or wrong behavior.
Here you can see some tips to make it work
If you want to dynamically listen to changes in the dark mode on android, you can use the plugin I’ve developed. In opposition to checking whether dark mode has been enabled during app launch, the plugin will allow you to listen to changes in the dark mode even while your app is running. Also, there is no need to target sdk 29. I’ve tested the plugin by targeting sdk 28 and it works fine.