[APP] [ROOT] OnePlus Dark Mode Toggler (QS Tile, Auto-switch on Sunrise/Sunset, etc.) - OnePlus 7, 7 Pro Cross Device Themes, Apps & Mods

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.

*Reserved*

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.

Gordietm said:
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.
Click to expand...
Click to collapse
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.

:/ $ 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
:/ #

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!

MOARStuff said:
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!
Click to expand...
Click to collapse
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?

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).

MOARStuff said:
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).
Click to expand...
Click to collapse
Great App, i missed it! Can I somehow help with the translation into Russian?

jimmy123322 said:
Great App, i missed it! Can I somehow help with the translation into Russian?
Click to expand...
Click to collapse
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!

MOARStuff said:
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!
Click to expand...
Click to collapse
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.

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")

MOARStuff said:
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")
Click to expand...
Click to collapse
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:

Gordietm said:
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:
Click to expand...
Click to collapse
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.

MOARStuff said:
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.
Click to expand...
Click to collapse
Yes, that did it. Thanks ?

jimmy123322 said:
Great App, i missed it! Can I somehow help with the translation into Russian?
Click to expand...
Click to collapse
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.

It's very good! I like this so much! Thanks for your work!

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.??

henk5921 said:
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.
Click to expand...
Click to collapse
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!

When I use the app naptime, the auto switch cannot be worked? Is it a bug?

Related

[Question] Change brightness when app is launced and revert back when closed

Basicly what i want is, when i launch an app;
- if brightness is manual(say 50) i want brightness to get max(100) and when i close the app , brightness goes back to 50.
-if brightness is auto, i want auto brightness disabled, set Brightness to 100,and when I close the app, i want brightness back to auto.
I am only able to: disable auto brightness >set it 100>set back to auto when i close. But if it is manual to be start with, i end up having auto brightness when I close the app.
I hope i explained the problem clear enough. Thanks in advance
Profile: Brightness (220)
Application: Chrome
Enter: Anon (227)
A1: Variable Set [ Name:%Bright To:%BRIGHT Do Mathsff Appendff ]
A2: Display Brightness [ Level:255 Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
Exit: Anon (228)
A1: Display Brightness [ Level:%Bright Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
A2: Variable Clear [ Name:%Bright Pattern Matchingff ]
Hope this helps.
Sent from my SM-N920C using Tapatalk
What does the numbers mean in the parenthesis(as in "Brightness (220)). Sorry but the noob question
Lorrid13 said:
What does the numbers mean in the parenthesis(as in "Brightness (220)). Sorry but the noob question
Click to expand...
Click to collapse
I have the same question. Would somebody please clarify?
Lorrid13 said:
What does the numbers mean in the parenthesis(as in "Brightness (220)). Sorry but the noob question
Click to expand...
Click to collapse
You can ignore that. It's just the format of the XML file they copy/pasted.
MishaalRahman said:
You can ignore that. It's just the format of the XML file they copy/pasted.
Click to expand...
Click to collapse
Thanks a bunch, mate!
ashfaaa said:
Profile: Brightness (220)
Application: Chrome
Enter: Anon (227)
A1: Variable Set [ Name:%Bright To:%BRIGHT Do Mathsff Appendff ]
A2: Display Brightness [ Level:255 Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
Exit: Anon (228)
A1: Display Brightness [ Level:%Bright Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
A2: Variable Clear [ Name:%Bright Pattern Matchingff ]
Hope this helps.
Sent from my SM-N920C using Tapatalk
Click to expand...
Click to collapse
It works as it should when auto brightness is off. When auto brightness is on, it sets brightness to 100, but only a visual change in notification shade, brightness doesn't change on screen. I think the problem is, it doesn't disable auto brightness before it changes brightness value if auto brightness is on.
I just fixed it by adding "auto brightness: off" action in first task, between "variable set" and "display brightness: 255".working perfectly now. Thank you very much.

background learning of cell towers areas

Hi,
It doesn't seems to practical to have the phone on an inside the task to learn a new cell tower are. I found this post
https://groups.google.com/forum/#!topic/tasker/UXVXY3gYwqw
in which there is a profile and a task that record recent Cells ID to a predefined variable.
The profile and task are:
Profile: Record Cells (181)
Event: Variable Set [ Variable:%CELLID Value:* ]
Enter: RecordCells (182)
A1: Variable Set [ Name:%CELL_List To:%CELLID
Do Mathsff Appendn ] If [ %CELL_List !~ *%CELLID* ]
This is launched from a button with the following actions:
Action 1: Perform Task : Record Cells (this is to capture the current cell as the above only kicks in when the cell changes):
RecordCells (182)
A1: Variable Set [ Name:%CELL_List To:%CELLID
Do Mathsff Appendn ] If [ %CELL_List !~ *%CELLID* ]
Action 2: Set Profile Status (Record Cells) On
Its necessary to create a button on a scene. (I've attached the files)
It works but i would like to know the following:
1.- To stop the cell tower recording, for when i leave the area. There its been said that clearing the %CELLgatherswitch variable should work, but when i see the variable values, it is always empty, so nothing to clear...
2.- To learn different areas: copying the task and change the variable name do the trick i think, but for now i have no way to stop it.
3.- Is really a difference between executing the RecordCell task manually and trough an scene?
Any help will be appreciated!

With Tasker brightness not adjustable

Hi,
I have an issue with Tasker on my Oreo car stereo.
With Tasker I am not able to adjust the screen brightness:
Code:
Profile: Night (7)
State: Twilight [ Configuration:From CIVIL DUSK to CIVIL DAWN at Device location. ]
Enter: Dimmer ON (5)
Stay Awake
A1: Display Brightness [ Level:0 Disable Safeguard:eek:n Ignore Current Level:eek:ff Immediate Effect:eek:ff ]
A2: Set Tasker Icon [ Icon:mw_action_bookmark_border ]
Exit: Dimmer OFF (6)
A1: Display Brightness [ Level:255 Disable Safeguard:eek:n Ignore Current Level:eek:ff Immediate Effect:eek:ff ]
A2: Set Tasker Icon [ Icon:mw_action_bookmark ]
Even the manual executing of the task it doesn´t change the brightness.
Any hints how to get this working?
I used exactly this task on earlier radio with Android 7 and it is still working fine on my Phone with Android 7.
I think the behavior is related to Andoid 8, could that be possible?
Is adaptive brightness turned off?
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
Is adaptive brightness turned off?
Click to expand...
Click to collapse
Yes it is turned off in the Android settings, to not use the head lights.
Even if I switch off adaptive brightness in the task it doesn´t do anything.
The unit itself has no light sensor, so I need something which dims the screen brightness independant of the head lights.
rigattoni said:
Hi,
I have an issue with Tasker on my Oreo car stereo.
With Tasker I am not able to adjust the screen brightness:
Code:
Profile: Night (7)
State: Twilight [ Configuration:From CIVIL DUSK to CIVIL DAWN at Device location. ]
Enter: Dimmer ON (5)
Stay Awake
A1: Display Brightness [ Level:0 Disable Safeguard:eek:n Ignore Current Level:eek:ff Immediate Effect:eek:ff ]
A2: Set Tasker Icon [ Icon:mw_action_bookmark_border ]
Exit: Dimmer OFF (6)
A1: Display Brightness [ Level:255 Disable Safeguard:eek:n Ignore Current Level:eek:ff Immediate Effect:eek:ff ]
A2: Set Tasker Icon [ Icon:mw_action_bookmark ]
Even the manual executing of the task it doesn´t change the brightness.
Any hints how to get this working?
I used exactly this task on earlier radio with Android 7 and it is still working fine on my Phone with Android 7.
I think the behavior is related to Andoid 8, could that be possible?
Click to expand...
Click to collapse
Hi Mate.
I have exactly the same problem. Did you get a solution?
I have a Xtrons Android 8 unit and brightness does not work , exactly like you explained.
Did you get a solution?
Hi,
there will be no solution until they use the Adroid_API as it should be.
Tasker uses the API, but the dev of our version seems to use different folder structures.
If I have a look at the traces I find the following entry:
Code:
05-07 13:45:54.415 292 292 E Lights Hal: write_int failed to open /sys/class/backlight/rk28_bl/brightness
/sys/class/backlight/rk28_bl/brightness would be the correct folder used by the API.
The reason for this issue is, that the folder rk28_bl does not exist. The file "brightness" is stored in folder:
/sys/class/backlight/backlight/brightness
I´m thinking about a method to get a workaround for this issue, but I don´t have the needed time to do it in the moment.
Hello,
I have the same issue. Did you find how to fix this?
alek_05 said:
Hello,
I have the same issue. Did you find how to fix this?
Click to expand...
Click to collapse
I got a new firmware for my Pumpkin and use FCC car launcher, which is able to do it.
rigattoni said:
Hi,
there will be no solution until they use the Adroid_API as it should be.
Tasker uses the API, but the dev of our version seems to use different folder structures.
If I have a look at the traces I find the following entry:
/sys/class/backlight/rk28_bl/brightness would be the correct folder used by the API.
The reason for this issue is, that the folder rk28_bl does not exist. The file "brightness" is stored in folder:
/sys/class/backlight/backlight/brightness
I´m thinking about a method to get a workaround for this issue, but I don´t have the needed time to do it in the moment.
Click to expand...
Click to collapse
Try this, run shell with tasker :
settings put system screen_brightness=216
value : 0 to 216
philippe734 said:
Try this, run shell with tasker :
settings put system screen_brightness=216
value : 0 to 216
Click to expand...
Click to collapse
No that can not work... and it does not work with OREO head units... at least not with mine.

Using Arlo camera movement detection notification to switch Phillips Hue lamps on/off

I've been trying to create a profile which uses the Arlo camera movement detection notification to switch a specific group of Phillips Hue lamps (Hue Arlo group) on and after 3 minutes off again from 22.00 till 06.30 in the morning. To be repeated whenever a new notification is triggered by movement. As the notification is different for each camera, depending on its position, I've taken the identical part of the notification "motion is detected" subtext as the trigger. However, as a noob I must have done something fundamentally wrong as the profile doesn't work at all. Could someone please help to point me in the right direction to get it up and running? Your help would be much appreciated!
Profile: Hue Arlo Group (21)
Restore: no
Event: Notification [ Owner Application:Arlo Title:* Text:* Subtext:*motion is detected* Messages:* Other Text:* Cat:* New Only: On ]
Time: From 22:00 Till 06:30
Enter: Hue Arlo Group On/Off (22)
A1: Hue Essentials [ Configuration:Arlo group (Switch on) Timeout (Seconds):0 ]
A2: Hue Essentials [ Configuration:Arlo group (Switch off) Timeout (Seconds):180 ]

Any Way To Control Charging

Has anyone figured a way to control the charge limit via Input Power Control module or the app Battery Charge Limit? I've stuck out with both unfortunately.
Set a custom control file for Battery Charge Limit...
Path Data: /sys/class/power_supply/charger/charge_disable
Enable Value: 0
Disabled Value: 1
The phone will still say that it is charging, but the battery level will have stopped where you set it to.
Anyone found a solution for Android 11? I used the above settings fine on 10 with battery charge limit app, but on 11 it will intermittently charge to 100% overnight.
Edit-Advanced Charging Controller magisk module seems to be working so far.
The app battery charge limit was working with the post no 2 settings until i updated to android 11.
Will try the magical.module and report back. A bit difficult to setup. Hard to read via terminal.
Sent from my Nexus 5 using Tapatalk
Battery Charge Limit still works for me with Sept/Oct updates.
On android 11?
Care to share your settings?
Sent from my Nexus 5 using Tapatalk
Sorry, but it never stopped working for me... so I'm using the same settings I posted above.
On android 11?
Sent from my Nexus 5 using Tapatalk
What else would September and October updates be?
I am using same setting with Tasker to limit my charging to 80% on overnight charging.. It still works now on Android 11.
jljtgr said:
Set a custom control file for Battery Charge Limit...
Path Data: /sys/class/power_supply/charger/charge_disable
Enable Value: 0
Disabled Value: 1
The phone will still say that it is charging, but the battery level will have stopped where you set it to.
Click to expand...
Click to collapse
This is working for me on a Pixel 4 XL with the latest Android 11.
EDIT: Got it working perfectly with these additional settings:
Enforce charge limit: disabled
Always Write CFTRL File: enabled
------------------------------------------
so to put it all together, for the Pixel 4 XL:
Manually enter Configure Control Data ->
Path Data: /sys/class/power_supply/charger/charge_disable
Enable Value: 0
Disabled Value: 1
Advanced settings ->
Enforce charge limit: disabled
Always Write CFTRL File: enabled
Since Battery Charge Limit is somewhat abandoned and might get disrupted more by successive Android versions... I started looking into replacing this functionality with Tasker... since Tasker is supported, it should keep running despite new battery optimizations.
I've attached the full Tasker project at the end. Download it to your phone, open Tasker, long-press the Home icon at the lower-left, select Import Project and select the XML file attached. Lastly, manually run the "Charge Limited" task. This will set up the QuickTile and %BATTLIMIT variable.
Here are some description exports of what the project does.
Code:
Profile: Check Battery To Enable (92)
Restore: no
State: Battery Level [ From:0 To:55 ]
State: Power [ Source:Any ]
Enter: Enable Charger (88)
A1: Read Line [ File:/sys/class/power_supply/charger/charge_disable Line:1 To Var:%bdisable Structure Output (JSON, etc):Off ]
A2: If [ %bdisable ~ 1 ]
A3: Flash [ Text:Enable: %BATT% Long:Off ]
A4: Run Shell [ Command:echo '0' > /sys/class/power_supply/charger/charge_disable Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A5: End If
Code:
Profile: Check Battery To Disable (93)
Restore: no
State: Battery Level [ From:60 To:100 ]
State: Power [ Source:Any ]
Time: Every 2m
Enter: Disable Charger (87)
A1: Read Line [ File:/sys/class/power_supply/charger/charge_disable Line:1 To Var:%bdisable Structure Output (JSON, etc):Off ]
A2: If [ %bdisable ~ 0 & %BATTLIMIT ~ 1 ]
A3: Flash [ Text:Disable: %BATT% Long:Off ]
A4: Run Shell [ Command:echo '1' > /sys/class/power_supply/charger/charge_disable Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A5: End If
There are two other tasks that configure the AutoNotifications tile and a task that accepts commands from the tile.
This obviously requires root. I will not answer any questions about not requiring root.
For QuickTile functionality, you will need AutoNotifications. If you don't have AutoNotifications, you will have to go into Tasker to toggle the functionality manually. For me, this uses AutoNotifications tile #2, you may need to configure the AutoNotifications task config to use other tile #'s. This was made for a Pixel 4 XL. It probably works for the Pixel 4. It might work for other Pixel phones, but I have no idea.
Edit: I redid my phone and noticed that Tasker can no longer ReadLine on rooted paths... so I had to replace it with a root shell command. (unfortunately this means a toast will appear for root usage every couple minutes, which I personally disabled in Magisk)

Categories

Resources