I want to make widget that will change it's text depend from week day. I tought it could be done by mixing Minimalistic Text Widget and Tasker but I totally don't know how could anyone help?
Not really sure on the question - Minimalistic Text already displays the weekday.
Do you mean custom text that changes based on the day of the week?
Tasker has a "Day of Week" variable too, so you can switch off of that if that's what you wanted.
I want to display something like this:
"wonderfulWednesday" or "fabolousFriday" and I want to change first part of it (wonderful/fabolous) automatically every day.
anyone?
I don't know how variable text works, but maybe that's the key?
it's right next to static text
A rough way, but working.
Create 7 textfiles
monday,tuesday ..... sunday
In each of them put in the text You want
to be shown according to the given name of file/day
Put files in root of sdcard
In Tasker:
Make a task DayOfWeek
1:Tasker: Variable Set %LINE To 1
2:File: Read Line File:%DAYW Line:%LINE To Var %DAYSTRING
3lugin: Minimalistic Text Variable(Config) DAYSTRING = %DAYSTRING
Make A Profile that trigger Task "DayOfWeek" when ever You want
(Maybe at Time:00:01)
Set a Minimalistic Text Widget on homescreen Showing Variable DAYSTRING
Eurocrypt said:
A rough way, but working.
Create 7 textfiles
monday,tuesday ..... sunday
In each of them put in the text You want
to be shown according to the given name of file/day
Put files in root of sdcard
In Tasker:
Make a task DayOfWeek
1:Tasker: Variable Set %LINE To 1
2:File: Read Line File:%DAYW Line:%LINE To Var %DAYSTRING
3lugin: Minimalistic Text Variable(Config) DAYSTRING = %DAYSTRING
Make A Profile that trigger Task "DayOfWeek" when ever You want
(Maybe at Time:00:01)
Set a Minimalistic Text Widget on homescreen Showing Variable DAYSTRING
Click to expand...
Click to collapse
Hello. I just attempted this profile for another project I'm working on (trying to get Minimalistic Text to show weekdays as numbers- ie: Sunday=1, Monday=2, Saturday=7, etc.) and, although I have the text files in the root of the SD, it says it cannot find the files.
Any ideas?
Bump!
I was trying to find a similar solution as you. I have a Minimalist Text widget that shows the weather forecast for the next two days, and wanted to show the shortened, corresponding days of the week.
paulmz said:
Hello. I just attempted this profile for another project I'm working on (trying to get Minimalistic Text to show weekdays as numbers- ie: Sunday=1, Monday=2, Saturday=7, etc.) and, although I have the text files in the root of the SD, it says it cannot find the files.
Any ideas?
Click to expand...
Click to collapse
The problem you had may have been having a file extension. Tasker would be looking for "Monday" and you've given it "Monday.txt"
I nixed file extensions from my 7 text files, and it works fine.
I'm now trying to figure out how to get the same "mon" output for the day after tomorrow. I tried appending an extra letter to the filename to give "aMonday" withe the text "wed" inside, and I tried putting it on a second line in the "Monday" file. Neither worked. Any ideas?
omgmrj said:
I'm now trying to figure out how to get the same "mon" output for the day after tomorrow. I tried appending an extra letter to the filename to give "aMonday" withe the text "wed" inside, and I tried putting it on a second line in the "Monday" file. Neither worked. Any ideas?
Click to expand...
Click to collapse
For other's sake, I'd like to confirm that the former of my methods works fine. I had mistyped a string in Tasker, which caused my error.
omgmrj said:
For other's sake, I'd like to confirm that the former of my methods works fine. I had mistyped a string in Tasker, which caused my error.
Click to expand...
Click to collapse
Despite this thread being very old, it was a stepping stone for me in getting this to work, and in a way that I think is significantly more efficient.
I was trying to set a Minimalist Text widget to display info in the following format:
TOMSweatherTEMP|TOMNweatherTEMP
TOMS=Day of week tomorrow // For the sake of this example, lets assume today is Monday. We want this to Equal TUE
TOMN=Day of week after that // For the sake of this example, lets assume today is Monday. We want this to Equal WED
My solution
Tasker ProfileayofTom
From: 00:02 - 00:03
Task: DayofTomorrow
Task: DayofTomorrow
Variable Set: %TOMS to %TIMES + 86400 // This sets variable %TOMS to tomorrows date in seconds
Variable Convert: %TOMS Function Seconds to Long Date // This sets variable %TOMS to a long form date
Variable Split: %TOMS Splitter , // This makes the long date split into multiple variables where a "," is present. This creates 3 variables, %TOMS1, %TOMS2, %TOMS3. We will be using %TOMS1, which has become TUESDAY
Variable Section: Name %TOMS1 From 1 Length 3 // Because I wanted to show a short day name (Tues, not Tuesday), this action discards any characters outside of the first 3. Now we just need to send the variable to Minimalist Text
Minimalist Text: Configuration TOMS = %TOMS1 // This action is available through plugins. Set "variable name" to TOMS (this is what is sent to Minimalist Text). Set Variable Content to %TOMS1 (the local variable)
Now go to Minimalist Text and in the widget of your choice and add "Locale Variable" with Variable Name TOMS.
You're DONE!
To get the day after tomorrow:
Create a new profile: "DayofTomNext"
Create a new Task: "DayofTomNext"
Then use the exact same process as above, but add 1728000 instead of 86400, and replace TOMS with TOMN.
Hope this helps any who come around later.
No text files needed
Related
Do you find yourself annoyed having to manually add someone as a contact after receiving a phone call from them? Would you rather be prompted with the option to add them as a contact before you fumble going through the proper menus? This short tasker task will do just that for you, using the power of intents.
Prerequisites
OPTIONAL: Snackbar Tasker Plugin to make a neat prompt asking you to add the previous caller as a contact
Instructions
Click + to create a new Profile and name it "Add Contact" or anything else you want.
Choose a "State" context, go to "Phone" and select "Call." Set the Type to "Incoming" and leave the Number field blank.
Back out, and name the task that pops up whatever it is you want.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here's what your Profile should look like. Now, let's move on to the task itself.
Task --> If. For the first condition, put %CNAME ~ %CNUM. This checks whether or not the previous caller already has a set name by comparing it to the phone number they called from. If the two match, then that means the contact is not recognized. Press the + icon to create another Condition, and make sure that the two Conditions are linked by an And. For the second Condition, set it to %CNUM !~ 0. This checks to see if the previous caller was an unknown/private number, and if so, you won't be prompted to add them as a contact.
OPTIONAL: Plugin --> Snackbar Tasker Plugin. Select a "Bottom Sheet". Enter the configuration for the snackbar, and enter a title for the dialog that will pop-up (I put "Add caller as contact?"). Under "Items to appear in sheet separated by ","" put down Yes,No. Under "Commands to be sent separated by "," enter yes,no. Take note that there should be NO space between the comma. For the color name fields, enter the hex name for however you want the snackbar to be themed. When you're done, exit out by pressing the checkmark, then press the back key when you're back inside Tasker.
System --> Send Intent. Under Action put in android.intent.action.INSERT For Cat, leave it at None. For the Mime Type, type in vnd.android.cursor.dir/raw_contact. Next, for the first Extra field type in phone:[%CNUM] Finally, scroll down to Target and select Activity. If you followed the optional step above to make a snackbar, then under If set the condition to %bs_command ~ yes. This means the intent will only be sent if you select yes when the snackbar pops up after a phone call.
Task --> End If
That's it! Let me know if there are any suggestions you would make.
MishaalRahman said:
Do you find yourself annoyed having to manually add someone as a contact after receiving a phone call from them? Would you rather be prompted with the option to add them as a contact before you fumble going through the proper menus? This short tasker task will do just that for you, using the power of intents.
Prerequisites
OPTIONAL: Snackbar Tasker Plugin to make a neat prompt asking you to add the previous caller as a contact
Instructions
Click + to create a new Profile and name it "Add Contact" or anything else you want.
Choose a "State" context, go to "Phone" and select "Call." Set the Type to "Incoming" and leave the Number field blank.
Back out, and name the task that pops up whatever it is you want.
Here's what your Profile should look like. Now, let's move on to the task itself.
Task --> If. For the first condition, put %CNAME ~ %CNUM. This checks whether or not the previous caller already has a set name by comparing it to the phone number they called from. If the two match, then that means the contact is not recognized. Press the + icon to create another Condition, and make sure that the two Conditions are linked by an And. For the second Condition, set it to %CNUM !~ 0. This checks to see if the previous caller was an unknown/private number, and if so, you won't be prompted to add them as a contact.
OPTIONAL: Plugin --> Snackbar Tasker Plugin. Select a "Bottom Sheet". Enter the configuration for the snackbar, and enter a title for the dialog that will pop-up (I put "Add caller as contact?"). Under "Items to appear in sheet separated by ","" put down Yes,No. Under "Commands to be sent separated by "," enter yes,no. Take note that there should be NO space between the comma. For the color name fields, enter the hex name for however you want the snackbar to be themed. When you're done, exit out by pressing the checkmark, then press the back key when you're back inside Tasker.
System --> Send Intent. Under Action put in android.intent.action.INSERT For Cat, leave it at None. For the Mime Type, type in vnd.android.cursor.dir/raw_contact. Next, for the first Extra field type in phone:[%CNUM] Finally, scroll down to Target and select Activity. If you followed the optional step above to make a snackbar, then under If set the condition to %bs_command ~ yes. This means the intent will only be sent if you select yes when the snackbar pops up after a phone call.
Task --> End If
That's it! Let me know if there are any suggestions you would make.
Click to expand...
Click to collapse
Very nice, except I will never get this typed-in. Maybe publish the script that can be downloaded and inserted from tasker.
Dovidhalevi said:
Very nice, except I will never get this typed-in. Maybe publish the script that can be downloaded and inserted from tasker.
Click to expand...
Click to collapse
I added it as an attachment.
Working great. Thank you.
Good stuff man. I'll test tomorrow.
MishaalRahman said:
I added it as an attachment.
Click to expand...
Click to collapse
I had succeeded in doing this before. However, Tasker does not "see" this in either the projects or autimport folders. To where might I push it?
Dovidhalevi said:
I had succeeded in doing this before. However, Tasker does not "see" this in either the projects or autimport folders. To where might I push it?
Click to expand...
Click to collapse
It's a profile so it should go in the profile folder. To import a profile, you long-press on the "PROFILES" tab up top.
I notice that when I click "Yes" to add the caller as a contact, the phone number comes in the format [##########] with the brackets around it. Is there a way to make it come in the format +1 ###-###-#### ?
Akw6190 said:
I notice that when I click "Yes" to add the caller as a contact, the phone number comes in the format [##########] with the brackets around it. Is there a way to make it come in the format +1 ###-###-#### ?
Click to expand...
Click to collapse
The default intent action requires it to be formatted as such, as anything else simply makes the PHONE field end up as blank (not sure why). However, you can use AutoShare's intent builder with this intent in order to get around this. Credits to redditor /u/YoungKnave for this intent. You download this, import it into AutoShare, then inside Tasker rather than sending an intent through itself you would go to Plugin --> AutoShare and select the intent you imported. Then for the phone number, put %CNUM. I found that doing it this way properly formats it, however I didn't mention it above because AutoShare isn't a free app.
MishaalRahman said:
The default intent action requires it to be formatted as such, as anything else simply makes the PHONE field end up as blank (not sure why). However, you can use AutoShare's intent builder with this intent in order to get around this. Credits to redditor /u/YoungKnave for this intent. You download this, import it into AutoShare, then inside Tasker rather than sending an intent through itself you would go to Plugin --> AutoShare and select the intent you imported. Then for the phone number, put %CNUM. I found that doing it this way properly formats it, however I didn't mention it above because AutoShare isn't a free app.
Click to expand...
Click to collapse
Understood. I'll look into it. Thank you, sir.
MishaalRahman said:
It's a profile so it should go in the profile folder. To import a profile, you long-press on the "PROFILES" tab up top.
Click to expand...
Click to collapse
Found the profiles folder and moved it to there and was able to import it (one thing about tasker are all those non-intuitive, even hidden functions to try out, somehow )
Needs a Bottom Sheet and an AutoShare plugin. What do I install? A lot of plugins with paid additions by one author.
I tried this but I keep getting red marks on the if statement. Is there something I did wrong? Also, I couldnt download the file. How do I download it?
Thanks
Also, when I tried to import the profile, it kept saying failed to import profile data :/
Ok, most stupid question ever. Where do i get the tasker from?
Dovidhalevi said:
Found the profiles folder and moved it to there and was able to import it (one thing about tasker are all those non-intuitive, even hidden functions to try out, somehow )
Needs a Bottom Sheet and an AutoShare plugin. What do I install? A lot of plugins with paid additions by one author.
Click to expand...
Click to collapse
Snackbar Tasker Plugin and AutoShare are completely optional for this profile. The XML I attached uses it because I have paid for it and already use it frequently, but if you follow the instructions I've written above then you do not need to use either.
It might seem odd, but once you get into Tasker you will notice a recurring name in the most frequently recommended plugins: joaomgcd. This guy is a wizard at Tasker, and has made dozens of Tasker plugins. While you CAN do things without his plugins (as I've written) it does make things neater and simpler. It's up to you though.
arbolarc said:
I tried this but I keep getting red marks on the if statement. Is there something I did wrong? Also, I couldnt download the file. How do I download it?
Thanks
Click to expand...
Click to collapse
The red marks are fine. They simply mean that RIGHT NOW if you were to run the task it would fail the If statement. Meaning, the last phone call you had was from a recognized phone number, hence Tasker would fail this condition since it should only fire when the previous caller is not a recognized contact.
C114 said:
Ok, most stupid question ever. Where do i get the tasker from?
Click to expand...
Click to collapse
There are no stupid questions here! Here you go.
MishaalRahman said:
Snackbar Tasker Plugin and AutoShare are completely optional for this profile. The XML I attached uses it because I have paid for it and already use it frequently, but if you follow the instructions I've written above then you do not need to use either.
Click to expand...
Click to collapse
I installed them, not yet paid up. However, if I can get along without them, I already have a pretty crowded phone so a couple less apps would not hurt.
As I said, the problem is hand-entering all this stuff. Please attach a "virgin" version as well. Folks could try them both, see if they prefer snackbar's eye-candy or going bare is good enough. Unless I intend very involved usage, AutoShare might be overkill.
Not sure what I am missing, but the Send Intent action never fires for me, as the IF statement never passes.
I added a Flash action to verify that the %bs_command variable is being set correctly, and it appears to be.
Any ideas?
EDIT: Scratch that.. looks like my phone autocorrected one of the commands in the Send Intent action. Working now!
Nevernind i found the way
Hi,
I'm trying to learn Tasker and now I'm playing with active tasks as conditions. But I cannot seem to get %PACTIVE to play nice.
If I print %PACTIVE(#), it displays '0'.
If I print %PACTIVE(), it displays ''
If I try to set %pactive to %PACTIVE, the content is "%PACTIVE", which I've found means it's empty.
But I have one profile active as we speak. It's green in the profiles list and it's also listed in the nofication area.
Any ideas on how to deal with this?
This variable works with "," if you want to do any matching, such as night mode then it will be something like %PACTIVE ~R ,night mode,
Notice that it has to begin with and end with a ,
%PACTIVE is for active profiles, not for currently running tasks. %PACTIVE only lists those profiles for which you have manually set a name by long pressing the profile and then changing the name. If you did not change the name of a profile from its default name, you cannot use %PACTIVE to check whether that profile is active.
%TRUN contains list of currently running tasks.
Use these two as-is. Don't put brackets. Don't put numbers. %PACTIVE and %TRUN are full names of these variables.
%PACTIVE(#) = 0, because there are 0 items in an array of that name. %PACTIVE is a variable, not an array.
@Sukarn and @HatchetEgg
I'm using %PACTIVE to check for currently running profiles that are listed under the Profiles tab. Is that incorrect?
What I tried now, not that I had much hopes for it, is this:
1. If %PACTIVE ~R ,borte, | %PACTIVE ~R ,Borte,
2. If %PACTIVE ~R ,borte,
3. Flash Text Works for borte
4. End If
5. If %PACTIVE ~R ,Borte,
6. Flash Text Works for Borte
7. End If
8. Else
9. Flash Text Nothing to see here! Go away!
10. End If
Click to expand...
Click to collapse
I also tried "*,borte,*", but that didn't work either. "Borte" is only listed as a profile and not a task (the task it runs has a different name).
In every test, the script jumps to the Else part and displays the go away-message. Which I kind of expected as %PACTIVE ~ "\%PACTIVE".
tiwas said:
@Sukarn and @HatchetEgg
I'm using %PACTIVE to check for currently running profiles that are listed under the Profiles tab. Is that incorrect?
What I tried now, not that I had much hopes for it, is this:
I also tried "*,borte,*", but that didn't work either. "Borte" is only listed as a profile and not a task (the task it runs has a different name).
In every test, the script jumps to the Else part and displays the go away-message. Which I kind of expected as %PACTIVE ~ "\%PACTIVE".
Click to expand...
Click to collapse
1. No that is what %PACTIVE should do, to store currently running profiles running in tasker. It might even be case sensitive as well if I remember correctly.
2. The way you setup your task does not look right to me it should be something like this.
1. If %PACTIVE ~R ,borte, | %PACTIVE ~R ,Borte,
2. Flash Text Works for borte
3. Else
4. Flash Text Nothing to see here! Go away!
5. End If
3. From what I can tell from this variable it will not show its content regardless of flash or popup commands, but they do work even if you can't see it's contents. So use the above as an example, so you can implement it into any task.
HatchetEgg said:
2. The way you setup your task does not look right to me it should be something like this.
Click to expand...
Click to collapse
It's basically the same, as far as I can see. You only removed the nested If to tell me if the variable is case sensitive or not. With indentations, my code would be:
1. If %PACTIVE ~R ,borte, | %PACTIVE ~R ,Borte,
2. ... If %PACTIVE ~R ,borte,
3. ... ... Flash Text Works for borte
4. ... End If
5. ... If %PACTIVE ~R ,Borte,
6. ... ... Flash Text Works for Borte
7. ... End If
8. Else
9. ... Flash Text Nothing to see here! Go away!
10. End If
Lines 2 and 5 are just to pick up which one matched - or both, if that's the case. If none of them match, the Else is triggered. Or do you see any other problems?
HatchetEgg said:
3. From what I can tell from this variable it will not show its content regardless of flash or popup commands, but they do work even if you can't see it's contents. So use the above as an example, so you can implement it into any task.
Click to expand...
Click to collapse
Well, it still doesn't enter the first if statement for some reason...
tiwas said:
It's basically the same, as far as I can see. You only removed the nested If to tell me if the variable is case sensitive or not. With indentations, my code would be:
1. If %PACTIVE ~R ,borte, | %PACTIVE ~R ,Borte,
2. ... If %PACTIVE ~R ,borte,
3. ... ... Flash Text Works for borte
4. ... End If
5. ... If %PACTIVE ~R ,Borte,
6. ... ... Flash Text Works for Borte
7. ... End If
8. Else
9. ... Flash Text Nothing to see here! Go away!
10. End If
Lines 2 and 5 are just to pick up which one matched - or both, if that's the case. If none of them match, the Else is triggered. Or do you see any other problems?
Well, it still doesn't enter the first if statement for some reason...
Click to expand...
Click to collapse
Ah ok I understand why you did it that way, Also thanks for pointing this issue out, because by the looks of it, when I checked my profiles that use this global variable, they don't work correctly either! And I had those profiles for about 2-3 years, without any changes.
This would seem to suggest to me that this is a bug that needs to be reported to the dev.
UPDATE
I found out what the problem is! I disabled amplify and now %PACTIVE now works and even reports the actual data now
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 !
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.