[APP] [ROOT] OnePlus Dark Mode Toggler (QS Tile, Auto-switch on Sunrise/Sunset, etc.)

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
Hello XDA Community,

This is my first post in the XDA OnePlus 7/Pro Forums! After many months of development, I'm finally ready to reveal my app to the world. I've already published the app to the Play Store and I highly recommend grabbing it from there, as it will ensure you get the latest updates the fastest. Now, this app is something I'd always wanted on my OnePlus phone, and I've heard many requests from users on forums for OnePlus to add this feature. However, as far as I know, no app with similar functionality existed for OnePlus phones... until today.

About the app itself:
This app allows OnePlus users running Android 10 to set a Quick Settings tile that allows them to switch between the OP system-wide light and dark themes (this will affect all supported OnePlus, Google, and user apps, just like the actual setting in 'Customization > Tone' does). In addition, I've added in automatic theme switching based on time of day, meaning that when it's sunset, the phone will automatically switch over to dark theme, and when it's sunrise, the phone will automatically switch over to light theme. This aforementioned feature is toggleable, so if you discover that you don't like it, you can always disable it (as there are some drawbacks to this feature, discussed below). Also, I've added automatic wallpaper switching when the themes are changed, allowing for custom wallpapers depending on whether the light or dark theme is active (also toggleable, in case you don't want this feature).

Note about auto-switch feature:
Due to the stubbornness of System UI, when this feature is enabled and the phone is off and the phone detects sunrise/sunset, it has to quickly turn on the screen, then turn it off, in order to ensure that Ambient Display continues to work after switching themes. This only happens when the screen is off, and the screen "flicker" is almost unnoticeable from the sheer speed at which it occurs (but, if you stare at your screen when it's off for long enough during sunrise/sunset, you may notice it happen briefly). In addition, the auto-switch may kick in while the screen is on, which COULD, in very RARE CIRCUMSTANCES, cause you to lose some temporary unsaved work on your phone. I've never encountered this (at least, yet), but I have heard it is possible for things like the Google search bar or other small text inputs, etc.


After much thought, I decided to make the app free to use with no ads and no (paid) "premium" features. I am an independent developer and full-time high school student; if you found my app useful, please do consider donating to me through PayPal: paypal.me/opdarktoggler.

Grab the app from the Play Store (highly recommended): https://play.google.com/store/apps/details?id=com.harout.opdarkmodetoggler, or download the app from the apk posted below.
 

Attachments

Last edited:

Gordietm

Senior Member
Sep 11, 2012
1,977
460
113
Toronto
This is amazing. I've been missing this coming from my pixel 2 xl. I think a lot of people are looking for an app like this.
Thank you, it should be included in OOS.

If you want to add some themes, PitchBlack and Flux work really well on OOS 10. I use them all the time.
 
Last edited:

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
This is amazing. I've been missing this coming from my pixel 2 xl. I think a lot of people are looking for an app like this.
Thank you, it should be included in OOS.

If you want to add some themes, PitchBlack and Flux work really well on OOS 10. I use them all the time.
Thank you for the suggestion! If you dont mind, can you try running "su" then do "cmd overlay list" in a terminal emulator when you get the chance and post the output here? It would really help me to add support for those themes.
 

Gordietm

Senior Member
Sep 11, 2012
1,977
460
113
Toronto
:/ $ su
:/ # cmd overlay list
com.oneplus.calculator
[x] com.oneplus.calculator.basiccolorblack.overlay

net.oneplus.weather
--- net.oneplus.weather.basiccolorwhite.overlay
--- net.oneplus.weather.basiccolorblack.overlay

com.oneplus.gamespace
[x] com.oneplus.gamespace.black.overlay
[ ] com.oneplus.gamespace.white.overlay

com.google.android.googlequicksearchbox
[x] com.google.android.googlequicksearchbox.SwiftDark.OxygenOS

com.oneplus.card
[x] com.oneplus.card.black.overlay
[ ] com.oneplus.card.white.overlay

com.oneplus.note
--- com.oneplus.note.black.overlay
--- com.oneplus.note.white.overlay

com.oneplus.account
[ ] com.oneplus.account.basiccolorwhite.overlay
[x] com.oneplus.account.basiccolorblack.overlay

com.oneplus.soundrecorder
--- com.oneplus.soundrecorder.black.overlay
--- com.oneplus.soundrecorder.white.overlay

com.oneplus.deskclock
[ ] com.oneplus.deskclock.white.overlay
[x] com.oneplus.deskclock.black.overlay

com.oneplus.security
[ ] com.oneplus.security.white.overlay
[x] com.oneplus.security.black.overlay

com.oneplus.wifiapsettings
[ ] com.oneplus.wifiapsettings.basiccolorwhite.overlay
[x] com.oneplus.wifiapsettings.basiccolorblack.overlay

android
[ ] com.android.internal.display.cutout.emulation.corner
[ ] com.android.internal.display.cutout.emulation.double
[ ] com.android.theme.icon.square
[ ] com.android.internal.systemui.navbar.gestural_wide_back
[ ] com.android.theme.color.cinnamon
[ ] com.android.theme.icon_pack.rounded.android
[ ] com.android.internal.display.cutout.emulation.tall
[ ] com.android.theme.color.black
[ ] com.android.theme.color.green
[ ] com.android.theme.color.ocean
[ ] com.android.theme.color.space
[ ] com.android.internal.systemui.navbar.threebutton
[ ] android.ui.overlay.ct
[ ] com.android.internal.systemui.navbar.twobutton
[ ] com.android.internal.systemui.navbar.gestural_extra_wide_back
[ ] android.telephony.overlay.cmcc
[ ] com.android.theme.icon.teardrop
[ ] com.android.theme.font.notoserifsource
[ ] com.android.theme.icon_pack.filled.android
[ ] com.android.theme.icon.squircle
[x] com.android.internal.systemui.navbar.gestural
[ ] com.android.theme.color.orchid
[ ] com.android.theme.color.purple
[x] com.android.theme.icon.circle
[ ] com.android.theme.icon.roundedrect
[ ] com.android.internal.systemui.navbar.gestural_narrow_back
[ ] com.android.theme.icon_pack.circular.android
[ ] android.LivWhite.SolidNewAndroidBlue4285f4.OxygenOS10
[ ] android.PitchBlack.BC05GoogleDarkOceanTranslucentSystemUIOFFAndroid10Stockwithouttrack.Android10OOS
[x] android.SwiftDark.Oxygen.OxygenOS

com.android.mms
--- com.android.mms.overlay.cmcc
--- com.android.mms.overlay.ct

com.android.launcher3
--- com.android.theme.icon_pack.rounded.launcher
--- com.android.theme.icon_pack.filled.launcher
--- com.android.theme.icon_pack.circular.launcher

com.android.settings.intelligence
[ ] com.android.settings.intelligence.basiccolorwhite.overlay
[x] com.android.settings.intelligence.basiccolorblack.overlay
[ ] com.android.settings.intelligence.LivWhite.OxygenOS10
[ ] com.android.settings.intelligence.PitchBlack.Android10OOS
[x] com.android.settings.intelligence.SwiftDark.OxygenOS

com.oneplus.simcontacts
[ ] com.oneplus.simcontacts.basiccolorwhite.overlay
[x] com.oneplus.simcontacts.basiccolorblack.overlay

com.google.android.permissioncontroller
[x] com.google.android.overlay.modules.permissioncontroller

com.twitter.android
[ ] com.twitter.android.PitchBlack.Android10OOS
[x] com.twitter.android.SwiftDark.OxygenOS

com.oneplus.sound.tuner
[ ] com.oneplus.sound.tuner.basiccolorwhite.overlay
[x] com.oneplus.sound.tuner.basiccolorblack.overlay

com.android.cellbroadcastreceiver
[x] com.android.cellbroadcastreceiver.overlay.common
[ ] com.android.cellbroadcastreceiver.basiccolorwhite.overlay
[x] com.android.cellbroadcastreceiver.basiccolorblack.overlay

com.android.server.telecom
[x] com.android.server.telecom.overlay.common
[ ] com.android.server.telecom.basiccolorwhite.overlay
[x] com.android.server.telecom.basiccolorblack.overlay

com.android.dialer
[ ] com.android.dialer.basiccolorwhite.overlay
[x] com.android.dialer.basiccolorblack.overlay

com.oneplus.filemanager
[ ] com.oneplus.filemanager.white.overlay
[x] com.oneplus.filemanager.black.overlay

com.google.android.gms
[x] com.google.android.gms.SwiftDark.OxygenOS

com.oneplus.screenrecord
[ ] com.oneplus.screenrecord.white.overlay
[x] com.oneplus.screenrecord.black.overlay

com.xda.labs
[ ] com.xda.labs.PitchBlack.Android10OOS
[x] com.xda.labs.SwiftDark.OxygenOS

com.oneplus.aod
[ ] com.oneplus.aod.basiccolorwhite.overlay
[x] com.oneplus.aod.basiccolorblack.overlay

com.oneplus.mms
[ ] com.oneplus.mms.basiccolorwhite.overlay
[x] com.oneplus.mms.basiccolorblack.overlay

com.android.settings
[ ] com.android.settings.basiccolorwhite.overlay
[ ] com.android.settings.overlay.cmcc
[x] com.android.settings.basiccolorblack.overlay
[ ] com.android.settings.overlay.ct
[ ] com.android.theme.icon_pack.filled.settings
[ ] com.android.theme.icon_pack.circular.settings
[ ] com.android.theme.icon_pack.rounded.settings
[ ] com.android.settings.FluxWhite.OxygenOS10
[ ] com.android.settings.PitchBlack.Android10OOS
[x] com.android.settings.SwiftDark.OxygenOS
[ ] com.android.settings.Flux.OxygenOS10

com.oneplus.cloud
--- com.oneplus.cloud.basiccolorwhite.overlay
--- com.oneplus.cloud.basiccolorblack.overlay

com.android.wallpaper
--- com.android.theme.icon_pack.circular.themepicker
--- com.android.theme.icon_pack.filled.themepicker

com.qualcomm.location.XT
--- com.qualcomm.qti.optinoverlay

com.oneplus.opbackup
[ ] com.oneplus.opbackup.white.overlay
[x] com.oneplus.opbackup.black.overlay

com.android.phone
[x] com.android.phone.overlay.common
[ ] com.android.phone.basiccolorwhite.overlay
[x] com.android.phone.basiccolorblack.overlay

com.oneplus.contacts
[ ] com.oneplus.contacts.basiccolorwhite.overlay
[x] com.oneplus.contacts.basiccolorblack.overlay

com.android.emergency
[ ] com.android.emergency.basiccolorwhite.overlay
[x] com.android.emergency.basiccolorblack.overlay

com.android.systemui
[x] com.android.systemui.overlay.common
[ ] com.android.theme.icon_pack.rounded.systemui
[ ] com.oneplus.aodnotification.overlay.purple
[ ] com.oneplus.aodnotification.overlay.red
[ ] com.android.systemui.overlay.cmcc
[ ] com.oneplus.aodnotification.overlay.gold
[ ] com.android.theme.icon_pack.filled.systemui
[ ] com.android.theme.icon_pack.circular.systemui
[ ] com.android.systemui.overlay.ct
[ ] com.android.systemui.tiles.LivWhite.OxygenOS10
[ ] com.android.systemui.tiles.LivDark.OxygenOS10
[ ] com.android.systemui.statusbars.LivWhite.OxygenOS10
[ ] com.android.systemui.PitchBlack.TranslucentnotificationsOFF.Android10OOS
[ ] com.android.systemui.LivWhite.OxygenOS10
[ ] com.android.systemui.statusbars.LivDark.OxygenOS10
[x] com.android.systemui.SwiftDark.OxygenOS

com.qualcomm.qti.networksetting
--- com.android.networksettings.overlay.ct

com.oneplus.calendar
--- com.oneplus.calendar.white.overlay
--- com.oneplus.calendar.black.overlay

com.android.bluetooth
[x] com.android.bluetooth.overlay.common

net.oneplus.launcher
[ ] net.oneplus.launcher.white.overlay
[x] net.oneplus.launcher.black.overlay

:/ #
 

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
I just thought of something even better! Ill add in the option for users to input their own substratum themes for light and dark themes straight into the app. That way, users can choose which substratum themes they want to be enabled for light mode and which they want for dark mode. Stay tuned for v1.2! :D
 

Gordietm

Senior Member
Sep 11, 2012
1,977
460
113
Toronto
I just thought of something even better! Ill add in the option for users to input their own substratum themes for light and dark themes straight into the app. That way, users can choose which substratum themes they want to be enabled for light mode and which they want for dark mode. Stay tuned for v1.2! :D
Great idea.
So let's say I'm on the light mode using Flux White and I switch to dark mode using Flux. How will your app disable the Flux White overlays and enable the Flux overlays?
 

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
I'm working on the update for v1.2 right now. God willing, I'll have it done by tomorrow to post. I'm also going to release a major UI overhaul with this new version - really don't like how the current UI looks. Will also be adding in support for the custom Substratum themes. Im thinking of having the user input the name of their substratum theme (e.g. Flux or Pitch Black) as usually the overlays themselves are named after the name of the theme, if that makes sense (another e.g. Flux Black overlays are named package.FluxBlack.something).
 

jimmy123322

Senior Member
Jun 22, 2015
609
807
133
21
Moscow
vk.com
I'm working on the update for v1.2 right now. God willing, I'll have it done by tomorrow to post. I'm also going to release a major UI overhaul with this new version - really don't like how the current UI looks. Will also be adding in support for the custom Substratum themes. Im thinking of having the user input the name of their substratum theme (e.g. Flux or Pitch Black) as usually the overlays themselves are named after the name of the theme, if that makes sense (another e.g. Flux Black overlays are named package.FluxBlack.something).
Great App, i missed it! Can I somehow help with the translation into Russian?
 

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
Great App, i missed it! Can I somehow help with the translation into Russian?
I'm glad you like the app! I could definitely use some help with Russian translation. If you're down for it, I can post all the strings in the thread later, and you can just paste the Russian translation in this thread or DM me it and I'll most likely be able to have the translation up in a day or two for version 1.3. Don't worry, I won't forget to credit you! ;)
 

hellcat50

Senior Member
Jun 29, 2014
986
487
93
I'm glad you like the app! I could definitely use some help with Russian translation. If you're down for it, I can post all the strings in the thread later, and you can just paste the Russian translation in this thread or DM me it and I'll most likely be able to have the translation up in a day or two for version 1.3. Don't worry, I won't forget to credit you! ;)
I have some suggestions for the app: 1. add a option to manually set a location or choose the time when to switch the theme 2. Instead of switching to the completely white theme, add a option to instead use the colorful theme option (the partially white theme)

Other than that I like the app so far.
 

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
V1.2 is live on the Play Store and I've updated the apk in the original post to have v1.2's apk, too.

Release notes:
- Major UI overhaul
- Added support for user-custom substratum themes (in "Advanced options")
 
  • Like
Reactions: Gordietm

Gordietm

Senior Member
Sep 11, 2012
1,977
460
113
Toronto
V1.2 is live on the Play Store and I've updated the apk in the original post to have v1.2's apk, too.

Release notes:
- Major UI overhaul
- Added support for user-custom substratum themes (in "Advanced options")
Just tried switching from light to dark and back again. It worked, changing from Flux White to PitchBlack and Flux. Very nice, except the quick setting panel gets screwed up and half to reboot to fix it. I included a screenshot:
 

Attachments

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
Just tried switching from light to dark and back again. It worked, changing from Flux White to PitchBlack and Flux. Very nice, except the quick setting panel gets screwed up and half to reboot to fix it. I included a screenshot:
I'm not sure what this could be caused by but i highly suspect it has something to do with the theme's systemui overlays. See if that issue happens again (unlikely), and if it does, try disabling any systemui overlays you may have enabled. Let me know how that goes. :)
 

Gordietm

Senior Member
Sep 11, 2012
1,977
460
113
Toronto
I'm not sure what this could be caused by but i highly suspect it has something to do with the theme's systemui overlays. See if that issue happens again (unlikely), and if it does, try disabling any systemui overlays you may have enabled. Let me know how that goes. :)
Yes, that did it. Thanks ?
 

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
Great App, i missed it! Can I somehow help with the translation into Russian?
Hi, I hope you're doing well. Now that I have a little bit of free time, here's all the different strings (words/phrases/sentences) I used in the app. If you can translate these, it would be a tremendous help and I'll make a credits/special thanks section in the app for you (and anyone else who helps in the future)!



OP Dark Mode Toggler
Manual Controls
Apply Light Mode
Apply Dark Mode
Auto-switch

Enable auto-switch of light/dark modes depending on time of day:

Warning regarding auto-switch

If auto-switch is enabled, it will cause screen to turn on and off again if screen is initially off and the app is trying to switch themes (i.e. during sunrise and sunset). Rarely, you may also lose some temporary, unsaved work if the theme switches at that moment.

OK
Cancel
Wallpapers

In order to use a custom wallpaper, please upload your own photos using the above buttons. In order to clear the custom wallpapers, please use the button below.

Upload light wallpaper
Upload dark wallpaper
Reset custom wallpapers
Advanced options
Substratum Themes

Current list of substratum themes to be auto-enabled during light mode:

Current list of substratum themes to be auto-enabled during dark mode:

Add Theme
Remove Theme
None

Uploaded wallpapers deleted successfully!
Failed to add theme: may already be in the list.
Successfully added theme to list.
Failed: Please input a valid theme name.
Failed to remove theme: may not be in the list.
Successfully removed theme from list.
Input substratum theme
Input name of theme here (e.g. "SwiftBlack" or "LivWhite") without quotation marks.
Cannot get location
Couldn't get location of device. Please make sure location access is set to 'always allow' for this app and try again later.
 
Last edited:
  • Like
Reactions: altintas00

henk5921

Member
Jan 7, 2020
18
4
0
I can provide Chinese translation help.

Dear developer, this software is very nice and makes up for the dark mode of OnePlus, but it is a pity that he does not have a Chinese version. If I can, I am willing to provide Chinese translation services. I will send a document containing Chinese and English versions, hoping to have a Chinese version. Thank you.??
 
  • Like
Reactions: MOARStuff

MOARStuff

Senior Member
Sep 15, 2017
66
62
0
Dear developer, this software is very nice and makes up for the dark mode of OnePlus, but it is a pity that he does not have a Chinese version. If I can, I am willing to provide Chinese translation services. I will send a document containing Chinese and English versions, hoping to have a Chinese version. Thank you.
That would be a great help if you can give a Chinese translation. I'd be able to implement that into the app rather quickly. There were a few strings that i forgot to write in the list below, but I've added them now so nothing is missing in any translation. Thank you in advance! :)
 
  • Like
Reactions: henk5921