Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
cordova-plugin-android-dark-mode-support
Advanced tools
Apache Cordova plugin to enable proper dark mode support for Android WebView's
While Android supports a dark mode since API level 29 (Android 10), Android WebView's need explicit support for this.
This plugin changes the used Cordova WebView, no matter if the default from cordova-android or a custom one such as the cordova-plugin-ionic-webview to enable or disable the dark mode. This results in a correct usage of the (prefers-color-scheme: dark)
media query.
Additionally, when the native configuration changes, it is re-evaluated whether the dark mode is currently active.
Under the hood, the Configuration.UI_MODE_NIGHT_YES
, WebSettingsCompat.setForceDark
and WebSettingsCompat.setForceDarkStrategy
are used. You can read more here: https://developer.android.com/guide/webapps/dark-theme
In Android 13 (SDK 33) you do not this plugin anymore as the behavior was changed [again. All you need to do is tweak the used theme by setting:
<preference name="AndroidPostSplashScreenTheme" value="@style/Theme.AppCompat.DayNight.NoActionBar" />
Kotlin support is required. Due to the AndroidX support libraries used, only cordova-android >= 11.0.0 is supported.
You need to enable Kotlin config.xml
by setting GradlePluginKotlinEnabled
to true
.
$ cordova plugin add cordova-plugin-android-dark-mode-support
$ cordova plugin add https://github.com/timbru31/cordova-plugin-android-dark-mode-support.git
Just install the plugin. Initially it will check the dark mode settings of the device and update once a new configuration is received.
For a instance a timed/schedule theme change can issue a new configuration.
Built by (c) Tim Brust and contributors. Released under the MIT license.
FAQs
Apache Cordova plugin to enable proper dark mode support for Android WebView's
The npm package cordova-plugin-android-dark-mode-support receives a total of 18 weekly downloads. As such, cordova-plugin-android-dark-mode-support popularity was classified as not popular.
We found that cordova-plugin-android-dark-mode-support demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.