Hello guys, i'm no tasker expert, but i'll try to share my setup in order to turn off automatically notification (pulse) led, charging led and new notification wake up screen (under ambiant display) using tasker.
Requirements:
OOS (most custom roms have these things natively, and commands may differ from rom to rom)
Root
tasker
If you're new to tasker and need more step by step guide to create a task, there are plenty of tutorials and videos for that :good:.
First thing to understand is that there are multiple commands, you can choose to merge all the ones to disable lights into one task, and all the ones to enable lights back into another task, that's the easier way, but you can choose to make individual tasks that will be called one by one in another "main task", that's up to you, but the second choice will ask some extra work.
All the tasks will be created the same way, so i'll just help you with the first, then simply redo the things with the other commands.
Let's start with charging led, I named it LightsOff but you can name any task like you want.
Go to thet tasks tab, hit the "+" in the lower right, then name your task (LightsOff ?), then hit again the "+", type shell in the search field and select the "run shell", then, you'll need to type the different commands to be ran, one by line, so it meens after each command, hit "enter"
Once you're done, don't forget to tick the root checkbox.
For example, to turn the charging led Off you'll need the following commands:
Code:
settings put system battery_light_full_color 00
settings put system battery_light_medium_color 00
settings put system battery_light_low_color 00
There are other commands to turn it off, but for some reason, turn it back on will require a reboot, so to avoid that, i simply changed the colors to black, so it's not really turned off, but black (which is, for us, exactly the same).
You'll find all the commands at the end of the post, if you want to merge all commands (recommanded) into one task, go there and just add them to the task before saving it.
Save the task.
Now let's make the task that will get your charging led back to normal (or whatever suits you).
It's almost a copy and paste as the only changes are the name of the task (LightsOn ?) and the values for the colors.
Commands to type:
Code:
settings put system battery_light_full_color 16711936
settings put system battery_light_medium_color 16842752
settings put system battery_light_low_color 16842752
Save the task (root ticked obviously).
These are the default values, you can try other values if you like, that's what i've done, i like dimmed lights for charging, so mines are
Code:
settings put system battery_light_full_color 4096
settings put system battery_light_medium_color 8126464
settings put system battery_light_low_color 8126464
Before you ask, i could not find how find the correct number for a wanted color, i just tried many and wrote down ones i could keep, if you have an idea let's share it
So, now, here are the other commands that you can choose to merge to the first task or just create more tasks for each.
Wake up screen on new notification (you can find it under the ambiant display menu)
Warning: not same command as before, this setting is stored in the secure settings, not the system settings
Disable:
Code:
settings put secure notification_wake_enabled 0
Enable:
Code:
settings put secure notification_wake_enabled 1
And for the pulsing notification light.
Disable:
Code:
settings put system notification_light_pulse 0
Enable:
Code:
settings put system notification_light_pulse 1
You can merge all the commands in one single task for enable and another for disable if you want, that will be easier to setup.
Now all you have to do is create a new profile for night based on time of the day that will trigger the lights off.
Go to profiles tab, hit the "+" then "time" and choose the hours that suits you.
then select the task you want to run (the one that will turn off everything), after that, long click on the selected tak and select "add exit task"
then select the task that will turn all back on.
If you merged all the commands you're done, if not, you'll need to crete two tasks that will group the different tasks you want, i don't thinks it's worth the extra work but for knowledge purpose here's what you have to do.
Go to Tasks Tab, hit "+", give a name, hit "+" type "perform" in the search field and then select "perform task", hit the magnifying glass (the search icon, sorry english isn't my native language) then select the task you want, repeat this for each task you want to add to the "main" task.
Do the same for the "exiting" task.
This way is better as you can add extra tasks like going to airplane mode or mute sounds or whatever you want, but i i told before, it's much more work.
Hope this will help some stock (or xXx :good users, if you have questions, i'll try to answer, but as i said earlier, i'm really no expert with tasker, but if i could manage to do it, you too !
Have a nice day XDA !
Related
Hey, I've been tinkering for a few days with Tasker (begginer here) and I finally managed to do what I wanted when I installed it, that is turning WiFi or mobile data on for a few seconds every few minutes when the screen is off. I tested the battery drain with this task and after a full charge on my Huawei P9 lite, I managed to obtain 48 hours of battery life with 10 hours of usage.
Before anything else, this profile only works with Nougat. Marshmallow apparently doesn't allow apps to wake the device when it enters doze, even If I excluded Tasker and all the other apps I needed from doze. Nougat has a softer doze and it works great.
So, before you start, there are several requirements:
1. Tasker
2. Secure Settings plugin (for gps disabling and other stuff) - optionally
3. Taskkill (for killing processes when you turn the display off) - optionally
3. A rooted Nougat running phone
If you don't know how to root Nougat, there are several tutorials out there. Here's a small one for Huawei P9 Lite(mine runs on VNS-L21C432B370):
1. Revolution Recovery
2. Elite Kernel v5.1
3. PHH's Superuser
4. Adb and Fastboot drivers
5. Bootloader unlock code from huawei site (Tutorial)
6. USB drivers for your phone (just install HiSuite)
How to root Huawei P9 Lite Nougat:
- install adb and faastboot drivers
- use one of the methods to reboot to bootloader (i just reboot the phone with usb connected and hold volume down key)
- shift+right click where you have downloaded the recovery image, click "Open command window here" and type: fastboot oem unlock *insert bootloader unlock code here* and press enter
- after you unlocked your bootloader, from the same command window type: fastboot flash recovery revo_recovery.img
- reboot phone to recovery and install EliteKernel, after that wipe cache
- install PHH's Superuser from playstore and give Tasker, Secure Settings and Taskkill root permisions
Now for the Tasker profiles, small description:
Basically there are three profiles, one activates when the display is off, one after you unlock the display, and the third one does the magic. All the links are below.
Display Off profile with the Locked task does several things after you turn off the display:
- Sets variable LCD to 0 (you will se why in a minute)
- Sets Auto-Sync to off
- Turns off GPS (via Secure Settings plugin)
- several Taskkill actions (you can disable those if you want)
Display On profile with the WiFi On task does:
- Sets variable LCD to 1
- Turns on WiFi
- Waits 10 seconds
- If WiFi isn't connected turns of Mobile Data
- Turns on Auto-Sync
On-Off profile with Do task does the following every 2 minutes (change the value if you want or even set the hours between you want it active)
- If LCD~0 then
- Turn on WiFI
- Turn on Auto-Sync
- Waits 10 seconds
- If WiFi isn't connected then
- Turn on mobile data
- Wait 10 seconds
- Turn Wifi, Mobile Data and Auto-Sync off
Now go to Settings->Battery->Close apps after screen lock and allow Tasker, Secure Settings and maybe Superuser to run after you turn the screen off.
After that go to Settings->Apps press on the Settings icon on the bottom, go to Special Access->Ignore battery optimisation, press on the small arrow and select All apps, find Tasker, Secure Settinsg and maybe Superuser and allow them to stay active after doze.
You can customize the profile and add as many tasks as you like or play with the timers but I recommend not to alter the conditions for the profiles because some things won't work. This works 100%. Also, when I was researching, I found out you can monitor network usage and restrict the task from running if you have downloads in progress. I haven't implemented that, feel free to do the research and post the results.
And that's it. After this, enable all profiles and profit. Like I said, my average battery life is 48 hours and as long as nobody sends me important notifications that can't wait 2 minutes until I receive them, it's the best battery save trick I know.
Tasker profiles&tasks
Extract the archive and paste the files wherever. After that long press the Profiles and Tasks tabs in Tasker and import the XML files.
Let me know if it works for you.
Cheers.
Hey man, I'm going to tell you right now, this was a great post. The content was ok, but your style, your step by step instructions WITH reasons... remarkable.
Keep it up and you will be the tasker man, just based on your dedication.
Now if I may tweak your content?
Adding wait actions inside tasks is a battery destroyer and is bad taskering in general. Plus doing checks, waiting, checking etc... just hard to debug, hard to enjoy when you're leaving battery juice you could be saving.
Set a time context DO profile that runs every.... switch to variable . And the variable...name it something like %synccheck
Then on your screen off profile, set %synccheck to %TIMES+360 (the current time in secs, plus 5 min) this only runs on screen off.
Create a SCREEN ON profile, set %synccheck to %TIMES+120 (the current time in secs, plus 2 min) this only runs on screen on. SO 2 MIN IF SCREEN ON. 5 MIN IF SCREEN OFF.
(NOTE: I WOULDN'T put too much effort into checking whether on data or Wi-Fi. Under Wi-Fi settings, just disable "keep wifi on during sleep " and that lets the system handle disabling and reenabling when the screen comes on.
(Build a tasker task that enables Wi-Fi based on location and disables on it when you leave the Wi-Fi area...)
he current time is %synccheck. Since the current time can never be null, it will never run if the variable was cleared
Since in this example, it's set 5 min from now, the timing profile will run. The timing profile is the one that enables auto sync and whatever else you want to at a given time.
So there's no checking at all. If we clear the variable %synccheck then the profile never runs. The profile is only enabling auto sync and disabling on the exit task.
Hey, thanks for the reply. I am aware that my tasker knowledge is limited. I will take your tips into consideration and update my guide.
Cheers!
[UPDATED]
Hello guys,
A little introduction:
I'm an XDA user for quite a while now, but never started an own thread. As I like playing with mods like Xposed, magisk or, in this case Tasker, I'd like to share my profile with those who find it handy too. Also I think there're way more advanced tasker guides and tricks and this is rather easy, but I'd love to share it anyways with you
What does this profile do?
It's pretty simple and basic. This profile lets you magically wake your phone with holding your hand (for example) close to the approximity sensor, but also (only on S8/S8+) trigger the Iris scanner, which would usually need to be tapped on, since Samsung doesn't allow 3rd-party apps to wake the phone! But we'll get this anyways But here's a video. You will see what I mean:
Click here for YT video (XDA embedding doesn't seem to work here)
Requirements:
Magisk (root) (*note: If you have rooted your phone with another method Secure Settings won't work, due to lack of development)
Secure Settings (*note: If you know another tasker plug-in, which can wake the device feel free to take that)
Tasker of course
Within Tasker you need to set proximity sensor (Under UI) to "yes". This ensures, that the sensor won't be killed from doze or anything else
And of course you need a working Secure Settings App. Make sure System+ module is active and granted root (Works very well with Magisk). Because it's enabled by default, it might be necessary to disable and re-enable it
If you meet all the requirements: Let's start
So step 1 : Create a new profile in Tasker with 3 status:
Sensor -> Proximity sensor
Display [Turned off]
Variable -> Variable value = %ONLYONCE to Undone (This is important, so the screen will be woken up only once after you turned off your device and not every time you put your hands to the sensor)
Name the executed task "Wake device" for example and let it run: (Go on in step 2)
Step 2: The executing task of the profile you just created should run this:
Task -> Wait = 350ms (adjustable to your needs)
Plug-In -> Secure Settings -> Configuration -> Wake device = Screen dim 15 seconds (adjustable)
Variable -> Set variable -> %ONLYONCE to Done
Code -> Run shell -> Command = "input tap 840 190" (No quotation marks) [Use root = yes] (*note: this creates a tap input, as if you were tapping on that specific spot, and triggers the Iris scanner. Also make sure that tasker has root privileges)
Step 3: Create a 2nd profile with the event Display -> Device unlocked
The executed task to this profile should be:
Task -> Wait = 3 seconds
Variable -> Set Variable -> %ONLYONCE to Undone
And that's about it Any time you wave your hand over the proximity sensor now or let's say pull it out of your pocket the screen goes on, the Iris scanner is triggered and your phone unlocks
Please hit the thanks button if you could find any benefit of this Guide and the profile and please feel free to leave some feedback You can also import the profile to your tasker. I attached it at the bottom
*Note: All iris scanner related tasks and profiles can be adjusted to devices without Iris scanners, but this profile isn't that handy on other devices apparently
2-25-23: Updated to version 1.6 Uninstall any previous version..
-cleaned up some obsolete code
-fixed potential infinite loop when update fails
-new issues related to processing incomplete weather data fixed
NST Weather Widget is a Tasker-generated app that runs in concert with Minimalistic Text to produce a true home screen widget displaying the current (forecast) weather in your locale as provided by OpenWeatherMap. The code for the weather is based on my NST Weather app with a few tweaks and without the status bar temperature/condition display. Because you build the widget yourself you can customize to suit yourself (within the parameters I have supplied).
Requirements
0. Root
1. If you previously installed NSTWeather (the status bar app), remove it completely, including the NSTWeather folder on the sdcard.
2. This is a Tasker-generated app. If you already have one of my other Tasker-generated apps or have previously installed GApps, you don't need the two Google maps library files included in the zip and can delete them. If you do need them, copy the two files into the locations shown below:
/system/etc/permissions/com.google.android.maps.xml
/system/framework/com.google.android.maps.jar
Set permissions for both files to rw-r--r-- and reboot. Without these files resident, the app will not install.
3. Copy the folder "NSTWeather" and its contents from the zip below to the root of your sdcard. This contains all the condition icons for the forecast panel and is where the weather.xml file from OWM will be stored.
4. Go to https://openweathermap.org/ and find the current weather for your locale. When this is displayed you will also see the "geocoordinates" (i.e., the latitude and longitude). Copy these two values.
Edit: I have three devices and on one of them the coordinates given by OWM always result in a town about a 100 miles up the coast. This is the same data used successfully by the other two devices! What finally worked for me was to go here: https://www.maps.ie/coordinates.html and enter my full home address. The coordinates were quite a bit different but worked perfectly.
5. Go to https://openweathermap.org/api and sign up for a free API (right there in the opening paragraph, click on the words "sign up"). You will eventually receive an email with the API.
6. Install Minimalistic Text (attached below). Installation and setup are tricky on the NST. There seem to be permission issues which are not entirely resolvable. What I ended up doing was installing a copy on a KitKat device and copying out two of the xml preferences files from the /data/data/de.devmil.minimalitext/shared_prefs. But this is not consistent and finally I decided to put together a flashable CWM zip of a working installation. That's what's below. Copy this onto your CWM sdcard, boot up CWM and install the zip. Reboot and your Minimalistic Text is good to go. No CWM card? Head over to here and make a card from either of the two sdcard versions. I have also modded the version of Minimalistic Text in the zip file so that widgets you create are visible in the opening screen of the app (as opposed to a black screen...).
7. Copy the Font folder (and its contents) from the zip below to your sdcard. The customized TrueType font of weather condition icons resides in this folder and you can add additional custom fonts for Minimalistic Text to access in the same folder.
Installation and Use
You MUST have Minimalistic Text installed before installing NST Weather Widget.
Install the app from the zip below either by side-loading or ADB. The initial user interface of the app is a Settings page. Open NST Weather and enter your latitude and longitude, as well as your API. Be especially careful with the API and make sure to include any negative signs with the geocoordinates.
Next, make your selection of the units you want displayed. Finally, to make the app fully functional you need to check both of the boxes in the lower section (you can disable the app temporarily by unchecking these). When you've made all the selections, tap on the bottom box to start a manual data retrieval. The Settings page will close and you should see WiFi come on for a bit. It will then turn off. If a successful connection was made with OWM and if you entered your information correctly, you will eventually receive a notification that the process is complete (first time only). How long will it take? About 3 minutes. There's an awful lot of stuff to be done. That's one reason for having the data update done at 3:30 am when you are hopefully snoozing. OWM finally added a time zone adjustment to their xml data file but I decided to leave my own in place because various municipalities have their own approach to daylight/standard time changes so your time zone will match the local clock setting of your device.
If for some reason the device fails to contact OWM the first time it will try a second time. If the second time fails, you will get a notification telling you that download failed, assuming there is nothing wrong with the values you entered. Go back to the Settings page and carefully check your API. That's where the most likely error will occur. Of course you should check your geocoordinates, too, just to be sure.
Once an initial weather forecast has been successfully retrieved (and the data is processed), tapping the app icon will display the 5-day forecast panel rather than the Settings page. However, you can access the Settings page from the little cog-wheel icon on the forecast panel.
If you have made a successful connection with OWM before and one day there is a notification saying download failed, you can just ignore it and hope for better luck the next day unless you absolutely must have an updated forecast. In that case, you can use the manual retrieval option from the Settings page. There is no need to re-enter the latitude, longitude and API each time you open the Settings page once they have been entered correctly. Also, if you decide to change the locale, you only need to enter the new latitude and longitude, not the API.
The 5-day forecast panel is updated daily even if a download fails (data is just shifted to the left and the names of the days are changed). You access the panel by tapping on the app icon or--better--by assigning the app to your widget (see below). If you run through the data entirely without any WiFi contact OR if the device has been off for awhile and the data is no longer current when it is turned back on, you will receive a notification that there is no more forecast data. A tap on the widget will initiate a manual data update.
The Widget
This is the hard part for the user (as opposed to the hard part for me, which was the app!). The version of Minimalistic Text for the NST has some issues but once you get past them it seems to behave OK. Unfortunately, it appears to have been intended for black screens, so fonts are default white, and the opening screen which ought to display your widget configurations just shows black rectangles, regardless of how you've set up font colors and backgrounds. And...a few menu options are "invisible" due to the colors used.
Edit: I have replaced the copy of the apk in the zip with a modded version in which the display of the widgets in the opening screen of the app has been fixed.
Not to worry. You'll get past it.
The app shares four variables with Minimalistic Text every three hours as well as updating one of the variables at both sunrise and sunset (within the nearest quarter hour). The variables are:
LOCATION (where OWM says you are)
CURRTEMP (the current forecast temperature)
CURRCOND (the current forecast general condition--as icon)
TCURRCOND (the current forecast specific condition--as text)
You can use as many or as few of these as you like, as well as static text, in any arrangement, to construct your widget.
What follows is not an exhaustive exploration of Minimalistic Text. There are people better qualified for that. This is what worked for me. Your mileage may vary.
1. Find a spot on your home screen and long press there to add a widget (or do whatever you do for the launcher you are using to add a widget)
2. Choose a Minimalistic Text option. The sample widget shown below (just the weather one, not the day-date) is a horizontal 2x1, just to give you an idea.
3. Minimalistic Text now opens to a Settings page. Give your widget a Name (Weather?).
4. Uncheck the "Show background". Ignore Shadow settings (at least for now).
5. You can ignore the Orientation settings for now. If there is some effect you are trying to achieve it may pay to return to them, but maybe not.
6. Under Predefined layout, select the last option: Custom (BTW, don't get distracted by the temperature stuff. The weather services of this old app are defunct.). We'll come back to Custom layout in a moment, but first...
7. You won't be able to see anything you are doing unless we do something about the font colors which are white by default. So under Text Style you will see three different options. For each one, you will want to set a font size (I like 20--you can override this later), a font color (probably black?), maybe the case, and an actual font to use.
Here's what I did:
Normal: font family=default, (not bold, not italic), size=20, case=normal, color=black
(use the "Back" status bar button to return for the other fonts)
Accented: font family=default, (bold, not italic), size=20, case=normal, color=black
(for some reason a sample of your Accented text does not appear...but it does work)
Non-accented: font family=weathericons.ttf, (not bold, not italic), size=20, case=normal, color=black
Note: you will only see the weathericons.ttf as a font option if you have done all the stuff described earlier.
8. Scroll on past a lot of Settings stuff to get to Tap behavior. You want the third option, Start another activity. When you check this box you see a new section to tap that will open a page which will eventually populate with activities. Find NST Weather and select it. This will make the forecast panel open when you tap on the widget.
9. Scroll back to Custom layout. DO NOT hit the back arrow!!!!! This will exit the app and you will lose everything you've done! Tapping on the box will open the "workspace" where you actually assemble your widget. By default there are three things already present there and it looks like mush below that because of the weather icon font. So, long-press on any of the default items until a trash can appears below. Then drag the item into the trash. Repeat for the other two. Now you have a clear workspace. There are three buttons at the right. The top button is for adding elements, the next one down adds a line, and the lowest one deletes a line.
10. Tap the topmost of the three buttons and you will see a bunch of options appear at the bottom of the workspace. Again, don't get distracted by the Weather options. They don't work any longer. You can explore later but for now what we want is "Misc". There are only two options on that tab, Locale variable and Static text. The first of these will be one of the four things I listed earlier. The second is just plain text that does not change (including something as simple as a space!).
OK, I am now going to build the widget shown in the image attached below. This may not be something you'd actually like to make, but I hope by me describing the process you'll get a feel for it. You can always go along with me now and then delete the whole thing afterwards, no harm-no foul.
11. Long-press on Locale variable until everything else fades away and then drag it up under "Custom layout". In the display space below you'll see [LOCTV]. That's for Locale Tasker Variable (I guess). Now tap on the grey Locale variable box and you'll see a mostly black section for text input. The first blank is for the name of the variable, like LOCATION. The drop-down is for the type of font face you want to use. I would select Normal. The last part is for overriding the font size from what you set before. I left that blank, so it's at 20. It is theoretically possible to dismiss this black area with the tiny "-" in the upper right corner, but it's devilishly difficult. I discovered by accident while working on this that another tap on the grey "Locale variable" box will clear the bottom box and save your work. (you can dismiss the keyboard with the status bar "Back" button)
12. Now tap the second of the right hand buttons to add a line. Tap the top button to add a new element and drag up another Locale variable, positioning it below the first one. Tap on the grey box. In the workspace, enter CURRCOND for the first field. Choose Non-accented text (this was where we assigned the icon font). I wanted this a bit larger so I checked the little box and entered 32 for the font size. Tap on the grey box to close all this and dismiss the keyboard as before.
13. Tap the top button to add a new element and drag a Static text box up to the second row. The only purpose of this box is to provide a space between the icon and the temperature! So tap on the grey box and the only thing you really need to do here is enter a space into the first field. Close things up as before.
14. Tap on the top button to add another element and drag another Locale variable box next to the Static text box. Tap on the grey box and enter CURRTEMP in the first field. The font would be Normal and I overrode the size to 32, as for the icon. Close things up as before.
15. Tap on the top button to add another element and drag another Static text box next to the Locale variable you just did. This is for the degrees symbol. Tap on the grey box and enter the degree symbol and either C or F in the first field. The font would be Normal and the size I made 32. Close things up as before.
16. Tap on the second button to add a final row. Now tap on the top button to add a new element and drag a final Locale variable box to sit below everything else. Tap on the grey box and enter TCURRCOND in the first field. I left the font at Normal and the size at default. Close up everything as before.
17. Use the status bar "Back" button to return to the Settings page. Scroll all the way to the end until you see Save/Restore. Tap "Save". Enter the name of the widget again (Weather) and hit "Save".
18. AND NOW THE MOST IMPORTANT STEP. Tap the "Menu" button on the status bar and you will see a menu appear at the bottom of the screen. Tap "OK". This is how you save your actual work, not just the settings. If you make changes, you always need to do this. This will exit the app and take you back to the home screen where--hopefully--you will see your widget!
19. If you wish to change/tweak the widget (as opposed to deleting it and starting over), tap on the MT icon and you will find yourself at the preferences entry page (all black...). You'll see your widget if you named and saved the preferences, but only as a black rectangle since your font color is most likely black and so is the page background (ugh...). Anyway, tap on the rectangle and you'll be back in the Settings area for that widget. Just remember, you need to save the preferences (near the end of the Settings menus--use the same name unless you are trying something out), and also you need to use the status bar "Menu" button to bring up the menu at the bottom of the page where you can tap on "OK" when you are done making changes.
Icons credit and information
I could not have done any of this without the weather icon font from Erik Flowers: https://erikflowers.github.io/weather-icons/. I did locate one other font but it had far fewer choices of glyphs. In the end I only actually used 13 of the glyphs for the weather condition icons. OWM has 18 general conditions (actually just nine doubled for day and night). After looking at the many choices offered in the font and the more detailed descriptions of the conditions from OWM, I decided to use day-neutral icons for situations in which the sky would be largely obscured. That means that the inaptly named "broken clouds" (51-84% cover), "shower rain", "rain", "thunderstorm" and "snow" show neither sun nor moon (and in fact are identical for day and night). There just seemed something odd about looking at driving rain and the sun peeking over clouds. Even in Coastal California we occasionally have such conditions as a storm is on the wane, but there just isn't enough fine gradation in the OWM condition icons so I had to make judgment calls. The specific text conditions, on the other hand, cover 54 situations and give some nuance to the general forecast.
In order to make the glyphs accessible to MT, I needed to partially remap the font, "moving" the 13 glyphs to standard keyboard characters rather than the glyph section which there is no way to access with the NST. I used the free version of Type Light 3.2 (https://www.cr8software.net/typelight.html) to do this.
The icons in the forecast panel are just images I created with a graphics program on my PC, using the remapped font.
So...if you don't like the condition icons you can, of course, not include them in your widget. If you want to change the icons in the forecast panel, you can replace the images in the NSTWeather folder. Just keep the size the same and make a transparent png. But if you want to replace the condition icons used in the widget, you will have to find another font somewhere and treat it as I did. You could also remap the font supplied if you prefer other choices of glyphs. That's quite a project and best left to individual questions.
That's a lot of work.
Wednesday at 11 AM has overflowed into two lines. Maybe there are extra spaces in the text?
I'd rather have the hours go left to right (even if there is less detail) and the days top to bottom.
Renate NST said:
That's a lot of work.
Wednesday at 11 AM has overflowed into two lines. Maybe there are extra spaces in the text?
I'd rather have the hours go left to right (even if there is less detail) and the days top to bottom.
Click to expand...
Click to collapse
Yes, indeed, a lot of work. Thanks for catching that layout issue on the panel. I was just fixing it as the email of your post came through. Layout is my least favorite part as Tasker on the NST is very cranky as you approach the screen size limit and it keeps shifting things every time you make a change. Then you need to go into the xml and find the coordinates and correct them...Then you transfer to another device on which App Factory will run and correct all the image paths...
Well, it's fixed
Amazing work. I hope you can get the error figured out. I'd love to add this to my office desktop nook.
deleted
Phone is Pixel 3a running Android 10, Tasker is up-to-date.
I have a profile called PwrConnect that runs a task called Clock. The task simply launches my alarm clock app on the phone. The profile is primarily triggered when any power is connected to the phone but it has a secondary condition that specifies the time must be between 10:30pm and 6:00am.
When I plug my charger into the phone the profile is not triggered. If I remove the secondary condition (the time constraint) then the profile triggers when I plug in. But here's where it gets kind of strange. If I include the secondary condition (the time constraint) and I have the Tasker app open when I plug the charger in then the profile fires and runs the task which launches the clock app. Alternatively, I have also tried putting the time constraint in the task (%time > 2230) but that does not work either.
What am I doing wrong??? Or, is this a bug? Anyone else see anything like this?
Do you have "reliable alarms" enabled?
Have you tried a simple profile to just test the time context?
ktmom said:
Do you have "reliable alarms" enabled?
Have you tried a simple profile to just test the time context?
Click to expand...
Click to collapse
I'm not sure what "reliable alarms" is. Is that a setting in Tasker or Android?
Anyway, I have done some more testing. I added another step to the Clock task to simply flash a message when the task runs and I have found that the task (and therefore the profile) is indeed being executed as it should be - that is: when power is connected and the time is between 10:30pm and 6:00am. I can tell this because the message flashes on the screen when I connect power. BUT... the clock app only launches if I have the Tasker app open when I connect power. If the Tasker app is not open then I see the message flash but the clock app does not launch.
Reliable alarms is a tasker setting in preferences on the monitor tab. It helps tasker accurately execute time related activities.
What device and ROM are you on?
The following profile works fine for me with Tasker not in the foreground:
Code:
Time: From 11:44AM Till 3:44PM
State: Power [
Source:Any
]
Enter: Open App
A1: Launch App [
App:Clock
Data:
Exclude From Recent Apps: Off
Always Start New Copy: Off
]
ktmom said:
Reliable alarms is a tasker setting in preferences on the monitor tab. It helps tasker accurately execute time related activities.
What device and ROM are you on?
Click to expand...
Click to collapse
Device: Pixel 3a, ROM: stock Android 10 (not rooted)
I am fairly certain that the problem lies with the clock app that I am using. When I change the task so that it launches the stock, built-in clock app then everything works as it should. The clock app that I am trying to use (Kaloer Clock) is no longer in the PlayStore so has not been updated in a while. So, I suspect that there is something about it that Android 10 does not like. The app still functions fine and I can manually start it or Tasker will start it IF Tasker is running in the foreground. In fact this app has a setting that should start it automatically when power is plugged in but that stopped working about the time that I upgraded to Android 10, which is why I was trying to automate it with Tasker. I hate to give up on this app though because it is the only clock app I have found that allows me to tap anywhere on the screen to snooze the alarm (or long-press to cancel it). Everything else I have tried makes you tap an on-screen button which is difficult without my glasses.
Using AutoNotification (or any tasker notification listener plugin), a scene and intents, you can make the Google Clock have a full screen snooze/dismiss "button".
I slapped together an example that I put on Taskernet. It's full screen, a tap snoozes and long press dismisses.
To run it as is, you will need AutoNotification installed. The "ktm" after the profile/task/scene names can be removed. I do this to help prevent name collisions with anything already existing during import.
ktmom said:
Using AutoNotification (or any tasker notification listener plugin), a scene and intents, you can make the Google Clock have a full screen snooze/dismiss "button".
I slapped together an example that I put on Taskernet. It's full screen, a tap snoozes and long press dismisses.
To run it as is, you will need AutoNotification installed. The "ktm" after the profile/task/scene names can be removed. I do this to help prevent name collisions with anything already existing during import.
Click to expand...
Click to collapse
Ktmom,
I installed AutoNotification and imported your project. I am assuming that I need to delete either step 2 or 3 in the Stop Alarm ktm task. But, the scene does not appear unless I have Tasker running in the foreground when the alarm fires. Just wondered if you have test this in Android 10? Seems as though all my problems started after I upgraded.
dremelts said:
Ktmom,
I installed AutoNotification and imported your project. I am assuming that I need to delete either step 2 or 3 in the Stop Alarm ktm task. But, the scene does not appear unless I have Tasker running in the foreground when the alarm fires. Just wondered if you have test this in Android 10? Seems as though all my problems started after I upgraded.
Click to expand...
Click to collapse
The action that you're not using can be deleted or left paused.
And no, sorry, I'm always slow to update to major releases. But, there's something to try.
Edit the scene that your using, without changing anything else, tap the 3-dot menu. Select "properties" and change the "property type" to "activity". Save out of the scene.
Now edit the task -> show scene action that you are using and change "display as" to "activity".
Save out of the task, and Tasker, then test again.
Hi,
I have set up the display timeout option with the settings below but it doesn't seem to work. I am using an oppo phone on Android 12.
Create a new task. Select the “+” button. Select “Display” followed by “Display timeout” Select the time span you want to set and then save. Now select “Profile” and click “+” and then “Applications” Mark the applications for which you want to activate this Tasker profile.
Then I open the app but after 15 seconds the screen turns off which is the default device screen timeout.
Is there no way to override this? Maybe get tasker to somehow keep interacting with the screen to keep it on?
I've tried this on a few apps and have got two different messages..
One says screen will stay on for 15 seconds which is the system screen time out.
Other says tasker will keep screen on but still times out after 15 seconds.
Really want this to work as some apps like games I don't want timing out after 15 seconds and I don't want to increase the system time to couple of mins for every app.
Hi,
I have the same problem on my OPPO A74 with Android 11 ((ColorOS Version V11.1). It seems impossible to create a task to change the screen time out; not in connection with a profile, shortcut or widget. The amazing thing, though - when you test the task in Tasker it works perfectly fine.
Media Volume, I think, also doesn't work. Other app connected profiles like autorotate or display brightness work well. I wanted to test more but I can't find the time.
I really miss the screen timeout though. It drains the battery too much to set it constantly to 15 minutes or so, but for some apps less simply is annoying.
The developer created some apk to help with some OPPO related problems, unfortunately, it didn't help with this one (sorry, I can't remember exactly what it was).
A kind of workaround: Once you've activated the Developer Options an your phone you can enable "Keep screen on while charging". When you need longer screen time, just plug into a charger.
But using a Tasker Profile would be much nicer.
Hope somebody knows a better trick.
Not sure if following could help your situation ( only for your gaming situation )
Create a new Profile, choose > apps > add your game apps in it. click left top arrow when finisning add gaming apps.
Tasker will pops-up task list > creat new task > Screen > Turn on.
** when above profile is complete , click the task when you are still in Profile list. Hold the task, it should pops-up with option exit task. Choose this as exit task.
Play around to see if this profile is working when gaming apps in foreground, screen never turn off.
EDIT: Try first not move the task as exit task. ( make the task as normal entry task )
eeeemc said:
Not sure if following could help your situation ( only for your gaming situation )
Create a new Profile, choose > apps > add your game apps in it. click left top arrow when finisning add gaming apps.
Tasker will pops-up task list > creat new task > Screen > Turn on.
** when above profile is complete , click the task when you are still in Profile list. Hold the task, it should pops-up with option exit task. Choose this as exit task.
Play around to see if this profile is working when gaming apps in foreground, screen never turn off.
Click to expand...
Click to collapse
Thanks for your reply.
Creating the profile is not the problem. It just seems that Tasker cannot change the system's setting. As mentioned, there is no problem when you create a profile allowing the screen to rotate using a speciffic app (and others as well ) I have no idea, why it does not work for the screen timeout.
Dreamcatcher0664 said:
Thanks for your reply.
Creating the profile is not the problem. It just seems that Tasker cannot change the system's setting. As mentioned, there is no problem when you create a profile allowing the screen to rotate using a speciffic app (and others as well ) I have no idea, why it does not work for the screen timeout.
Click to expand...
Click to collapse
I use no screen timeout, I use "screen turn on" in your situation as my op., enough I've not tried it on my Samsung A71.
eeeemc said:
I use no screen timeout, I use "screen turn on" in your situation as my op., enough I've not tried it on my Samsung A71.
Click to expand...
Click to collapse
"Display / turn on" works fine when I want the screen to turn on with a notification. But the screen turns dark after the system timeout has passed. I've also tried "Display / Stay On / with Wireless, AC or USB Power" and with the AutoInput Plugin "Screen Off Or On: Turn On / Timeout Never" but the screen always turns dark.
Those Profiles always worked on my other Smartphones (LG -D405, LG-K10 and Moto G6). I believe, it's the ColorOs that's causing the trouble.
Dreamcatcher0664 said:
"Display / turn on" works fine when I want the screen to turn on with a notification. But the screen turns dark after the system timeout has passed. I've also tried "Display / Stay On / with Wireless, AC or USB Power" and with the AutoInput Plugin "Screen Off Or On: Turn On / Timeout Never" but the screen always turns dark.
Those Profiles always worked on my other Smartphones (LG -D405, LG-K10 and Moto G6). I believe, it's the ColorOs that's causing the trouble.
Click to expand...
Click to collapse
below is a task ONLY FOR ROOTED DEVICE., no harm to try even if your's not root.
New task , run shell command , in the command input
there is a button 'use root' , check that button also.
settings put system screen_off_timeout 200000
** 200000 I'm not sure sure equals to how many second., just give it a try and if you get a longer screen on time from your issue it means it is working.
also, make another separate task, search for 'custom setting'. look up from there I thingk it is in system something about screen timeout.
EDIT: run shell command task suggest you run it manually., than see if it works. if not, restart device to check if it requires a restart in order to accept new timeout settings.
eeeemc said:
below is a task ONLY FOR ROOTED DEVICE., no harm to try even if your's not root.
New task , run shell command , in the command input
there is a button 'use root' , check that button also.
settings put system screen_off_timeout 200000
** 200000 I'm not sure sure equals to how many second., just give it a try and if you get a longer screen on time from your issue it means it is working.
also, make another separate task, search for 'custom setting'. look up from there I thingk it is in system something about screen timeout.
EDIT: run shell command task suggest you run it manually., than see if it works. if not, restart device to check if it requires a restart in order to accept new timeout settings.
Click to expand...
Click to collapse
I feel like I'm in Star Trek - "To boldly go, where no one has gone before" XD
When I try your suggestion, I only receive the message that my device isn't rooted.
Btw, for some tasks it is necessary to enable the Write Secure Setting Permission (f.e. Set Assistant), where xou have to setup ADB on your PC. Would such a procedure be registered by the phone as rooting? Anyway, I don't think I would dare to do something I know so little of.
Another solution I was thinking of, is it possible to create a tasker quick tile/ quick setting to change the system screen timeout.
So instead of having it change for certain apps which isn't working at the moment.
Maybe if we can change it from the system so will be for all apps. You can create two separate quick tiles to toggle between different screen timeout settings.
The newest version of Tasker (6.0.9) comes with Tasky.
Tasky offers the possibility to activate premade profiles. One of them is "Keep Display Awake For Apps". And that one works with my OPPO Phone.
I also tried "Auto-Mute Apps", another profile I couldn't get working. It also works fine.
To switch between Tasker and Tasky you just have to click on the "Three-Dots-Button" in the right top corner. It's not like switching apps but using different user interfaces.
Good luck!
- Sorry to say, but this seems to work for some apps and not for others. But at least sometimes it does work.
Thanks for replying back to this thread to inform me. I tried it and it works for the app I was trying to make it work for which is good! Makes it so much easier now.