Black themes are believed to save battery on smartphones with AMOLED displays. Android 10 introduces dark mode but it needs to be manually turned on or off. In this post, we discuss a new app called Automatic Dark Theme which lets users set an automatic dark theme on Android 10 based on time. Dark mode or night theme has become the rage of the day. We recently covered an article listing the best dark themes for Samsung devices running One UI.
We’ve seen evidence of Google working on a dark mode for Android since 2017 when Android 8.0 Oreo was released. It had a hidden dark theme that wasn’t quite ready for prime time. Then we got some dark theme with Android Pie. In 2019, we finally have a proper dark mode on Android with Android 10. With iOS 13, Apple also introduced a dark mode. iOS 13 was the first time we heard of Apple working on a dark mode for iOS.
Unlike Android 10, iOS 13 can automatically set light and dark themes based on the time of the day. Now, this is not bashing on Android, I’m a fan. But at times it just goes on to show how Google struggles to implement even good ideas while Apple usually nails them in the first attempt. It can get frustrating as an Android user. Thanks to the great third-party developer support though, you can now set automatic light and dark themes on Android 10 as well.
Automatic Dark Theme
[googleplay url=”https://play.google.com/store/apps/details?id=com.cannic.apps.automaticdarktheme”]Automatic Dark Theme works pretty much as advertised on any Google Pixel smartphone running Android 10 as well as Essential Phone since, essentially, it is stock Android. The app is also available in beta for the Huawei P30 Pro, the Xiaomi Mi 9, the Redmi K20 Pro (โstable betaโ). Several custom ROMs are also supported since they’re all mostly based on AOSP. On OnePlus devices running Oxygen OS, most things that change according to Android 10’s dark theme toggle do work. However, this list of things excludes anything by OnePlus and that includes all the stock apps like Phone, Contacts, Messages, Settings, etc.
It’s a simple app which makes some system-level changes. Therefore, it requires special permission known as WRITE_SECURE_SETTINGS. Plenty of Android customization apps have required this particular permission in the past so this is not new. The only thing is, this permission is not as easy to grant as turning on a toggle in the Settings, although it’s not difficult to grant either. Just mildly inconvenient if anything.
Enable USB Debugging
In order to grant the required permission, you’ll have to first enable USB debugging on your device, found in Developer options.
- Go toย Settingsย >ย Aboutย phone.
- Tap onย Build numberย 7 times.
- Youโll see a toast message that says, โYouโre a developer.โ
- Go back to Settings now, and youโll find a new option called โDeveloper Optionsโ, select it.
- Scroll down and find USB Debugging and enable it.
Grant WRITE_SECURE_SETTINGS Permission
Now that your device is ready to receive ADB commands, you’ll need ADB.
- Downloadย Android SDK Platform Toolsย for Windows, Mac & Linux
- Extract the downloaded zip file anywhere on your PC.
- The extracted platform-tools folder contains all the necessary tools required to run ADB and Fastboot.
- Next, launch a command prompt, Windows Powershell or Terminal inside the extracted platform-tools folder.
- On Windows, right-click and select Open Powershell here. Alternatively, you can type cmd in the address bar and hit Enter to launch a command prompt window instead.
- On macOS or Linux, right-click inside the folder and select Open in Terminal.
- Connect your Android 10 device to your PC with a USB Cable.
- You should see a prompt on your Android device asking to Allow USB Debugging permissions to your PC. Allow it.
- In case you don’t see the prompt right away, type the command given below on your PC and hit enter.
adb devices
- In case you don’t see the prompt right away, type the command given below on your PC and hit enter.
- Now that you can execute ADB commands from your PC on your phone, you can finally grant the required permission to the app. Enter the following command to do so.
- Command Prompt:
adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS
- Windows Powershell:
.\adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS
- Linux and macOS Terminal:
./adb shell pm grant com.cannic.apps.automaticdarktheme android.permission.WRITE_SECURE_SETTINGS
- Command Prompt:
Enable Automatic Dark Theme on Android 10
Finally, launch the app you’ve installed and you should be able to enable it with the toggle at the very top. By default, the app is set to enable the dark theme at 10 PM. It will also automatically disable the dark theme at 7 AM. You can adjust these timings or simply enable the option above: Follow sunset and sunrise. The app itself follows the dark theme toggle as well but it’s not an app you’ll be opening a whole lot after the initial set up.
There’s also the toggle to Switch the theme only when the phone is locked. This seems like a subtle option to include but it’s not. The system switching to a dark theme while you’re using an app would result in the app crashing or restarting. Certainly not great for the user experience. The app gets around this by simply doing it while the device is locked, i.e., not in use. Google’s method was to retract the feature altogether after testing it in beta.
Join The Discussion: