Native Android Dark Mode Detection Support for WebView Apps

Currently, Base44 WebView apps do not support native Android dark mode detection via the prefers-color-scheme media query. This is because WebSettingsCompat.setAlgorithmicDarkeningAllowed() is not enabled at the native wrapper level, which is outside of what can be controlled from app code.

Current Behavior:

  • prefers-color-scheme returns false inside the WebView on Android devices even when system dark mode is enabled

  • Dark mode detection works correctly on PC/browser but not on Android mobile devices

  • Confirmed affected devices include Samsung Galaxy S23 (fully updated)

  • Google Chrome on the same device correctly detects and applies dark mode, confirming this is a WebView wrapper limitation rather than a device issue

Expected Behavior: Base44 apps should be able to detect the Android system dark mode preference automatically, just as Chrome and other native apps do, by enabling WebSettingsCompat.setAlgorithmicDarkeningAllowed() in the native AAB/APK wrapper.

Impact: Developers are forced to implement manual theme toggles as a workaround, which adds unnecessary complexity and creates a subpar user experience compared to other apps on the same device.

Suggested Fix: Enable WebSettingsCompat.setAlgorithmicDarkeningAllowed() in the Base44 native WebView wrapper so that prefers-color-scheme media queries work correctly on Android devices.

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
πŸ’‘

Feature Request

Date

5 days ago

Author

Numaroo Studios

Subscribe to post

Get notified by email when there are changes.