Related
I need to disable notification sound only from selected app (For example what's app) when Bluetooth headset is connected. Is it possible with tasker? If yes please tell me how.......
Thanks in advance
my personal thoughts, this is so complicating and might not worth it... unless you have a real good reason for doing it, I would not recommend trying to implement this.
in case you still want this, you can try:
- install autoinput or something similar to mimic your actions in turning off sounds in those apps
- link those actions to a Tasker profile with Bluetooth conditions
I imagine you would need to have screen turned on for the actions to be carried out
This should not be very difficult.
You should set a profile to create a variable When bluetooth is connected.
Then a profile when the app is running, the task within would be: set a variable to memorize current media volume, then "if bluetooth connected, set media volume to zero".
Exit task would be: set volume media to original media volume.
Hi guys, I'm trying to reply something I had done with another task app (llama), but idk why, isn't working properly. Basically, I wanna airplane mode set on or off under not 1 but 2 conditions:
if time is between x and y (first condition)
and
if screen is on (second condition)
then
do nothing
but if screen is off, turn on airplane mode
this imply that when, between x and y, I will turn on the phone (for example during night, to check something), it will turn automatically plane mode off, and again on when screen turns off.
Any ideas to get this working? Thank you!
I think the most reliable way to do this is with three simple profiles.
The first is for the time context. The enter task would set a variable (e.g. %SleepTime) to "true".
The second profile has 2 contexts. The first is to check the previous variable (%SleepTime) is set to "true". The second context is screen off. The task would set a different variable (e.g. %ScreenOff) to true.
The third context checks for (%ScreenOff) is true. The enter task turns on airplane mode. The exit task turns off airplane mode.
The exit task for the first 2 profiles clears the variables.
This could be all handled in one profile using loops and tests for state. IMHO, using 3 profiles is more responsive.
hello,
i use a variable %Night, which is set to "yes" with a profile with the time condition and screen off condition ("if %SCREEN is off") without exit task.
%Night is set to "no" with other profile and all conditions you like. In your case i think it's only the time condition.
The airplane mode profile has as a condition "if %Night is true". Enter task: airplane on. Exit task: airplane off.
ktmom said:
I think the most reliable way to do this is with three simple profiles.
The first is for the time context. The enter task would set a variable (e.g. %SleepTime) to "true".
The second profile has 2 contexts. The first is to check the previous variable (%SleepTime) is set to "true". The second context is screen off. The task would set a different variable (e.g. %ScreenOff) to true.
The third context checks for (%ScreenOff) is true. The enter task turns on airplane mode. The exit task turns off airplane mode.
The exit task for the first 2 profiles clears the variables.
This could be all handled in one profile using loops and tests for state. IMHO, using 3 profiles is more responsive.
Click to expand...
Click to collapse
Hi guys, first thank you in Advance. Im trying this method, every condition seems ok but screen check, which remain black even if I test it on, and so airplane isnt set. I wonder why? Screenshot attached (notice Ive tried screen on just to check and it was still black as I guess means not working properly...)
Ty
There are things to remember.
The non-active state (black as you are saying) for screen off is always going to be the case when the screen is on.
When setting up and testing tasks that include variables, it is very easy to get into a non-defined state with the variables not setting/unsetting correctly. This subtle issue can cause all sorts of headaches because the variable isn't cleared (or set).
Here is the description of a working set of profiles. This variant sets a notification on screen off and screen on to affirm the task ran. The screen off task also vibrates as a tactile assurance the screen off task ran.
Code:
Profile: Airplane Mode Time (86)
Time: From 2:30PM Till 4:30PM
Enter: Airplane Mode Time Variable (87)
A1: Variable Set [
Name:%AirplaneModeSleepTime
To: true
Recurse Variables: Off
Do Maths: Off
Append: Off ]
Exit: Airplane Mode Time Exit (126)
A1: Variable Clear [
Name:%AirplaneModeSleepTime
Pattern Matching:eek:ff
Local Variables Only: Off ]
Profile: Airplane Mode Screen Off (88)
Priority: 1
State: Variable Value [ %AirplaneModeSleepTime ~ true ]
State: Display State [ Is: Off ]
Enter: Airplane Mode Screen Off (94)
A1: Variable Set [
Name: %AirplaneModeScreenOff
To: true
Recurse Variables: Off
Do Maths: Off
Append: Off ]
Exit: Airplane Mode Display On (11)
A1: Variable Clear [
Name:%AirplaneModeScreenOff
Pattern Matching:eek:ff
Local Variables Only: Off ]
Profile: Airplane Mode Set (118)
Priority: 1
State: Variable Value [ %AirplaneModeScreenOff ~ true ]
Enter: Airplane Mode Action (120)
A1: Notify [
Title:Airplane Mode On
Text:
Icon:
Number: 0
Permanent: Off
Priority: 3 ]
A2: Airplane Mode [ Set: On ]
A3: Vibrate Pattern [
Pattern: 0,500,100,500,100,500,100,500,100,500,100,500,100,500 ]
Exit: Airplane Mode Exit (125)
A1: Notify [
Title:Airplane Mode Off
Text:
Icon:
Number: 0
Permanent: Off
Priority: 3 ]
A2: Airplane Mode [
Set: Off ]
A3: Variable Clear [
Name:%AirplaneModeScreenOff
Pattern Matching: Off
Local Variables Only: Off ]
Hmm thx but Im confused a little, is possible to past this text somewhere?
No. But it sounds like you are really new to tasker. Maybe you should work through some tutorials to get some practice.
I used tasker long time ago, but what Im trying to do is quite simple, yet it doesnt work....for example Ive tried this simpler way:
Profile 1) Display on -> var set %Screenon to true
Profile 2) Display off -> var set %Screenon to false
Profile 3) from x to y -> 2 conditions) airplane mode set on if %Screenon is false; 2nd condition: airplane mode set off if %Screen on is true
I wanted to try like this to see but it works only when I press the play button under the actions. Otherwise if i turn on or off the screen nothing change...
takui said:
I used tasker long time ago, but what Im trying to do is quite simple, yet it doesnt work....for example Ive tried this simpler way:
Profile 1) Display on -> var set %Screenon to true
Profile 2) Display off -> var set %Screenon to false
Profile 3) from x to y -> 2 conditions) airplane mode set on if %Screenon is false; 2nd condition: airplane mode set off if %Screen on is true
I wanted to try like this to see but it works only when I press the play button under the actions. Otherwise if i turn on or off the screen nothing change...
Click to expand...
Click to collapse
I would suggest trying to turn screen on and off, check the Tasker log to see if the variable is set properly.
- If it does, trying manually set it to false, and then true in your time range x-y to see if 2nd profile reacts to that.
- If it does not, check 1st profile again, maybe you are using screen on and unlocked? or whatever... anyways, that should narrow down the possibilities at least
Ty, Reading the log Ive noticed that the variable is set correctly (see attach) but the 3rd profile doesnt set airplane...hmm
takui said:
Ty, Reading the log Ive noticed that the variable is set correctly (see attach) but the 3rd profile doesnt set airplane...hmm
Click to expand...
Click to collapse
so what does the log say when you manually run 3rd profile? just so we know the profile does not correctly start or not correctly run...
If I run it manually it works in both ways (on and off) otherwise no. Logs attacched. Its just that it doesnt check alone the variable and doesnt start alone
ok to clear things up:
- your display profiles can be combined into 1 with exit task
- have you tried to manually set %ScreenOn to each value to see if the profiles reacts to that - I doubt it would
- try using equal instead of match for the variable
- maybe post your profiles and tasks
Hello. I had them combined before, ive tried splitting but mothing changed... Log show that the variable is set correctly, what doesnt change is the airplane mode, as it doesnt care the variables at all (time frame condition btw works, as it is showed green...)
takui said:
Hello. I had them combined before, ive tried splitting but mothing changed... Log show that the variable is set correctly, what doesnt change is the airplane mode, as it doesnt care the variables at all (time frame condition btw works, as it is showed green...)
Click to expand...
Click to collapse
ok I think I know what the problem is: your timed profile is triggered by state and not event, which means during the time frame, profile is triggered and finishes, it will test your variable during this time only, and will not recheck if this variable changes, when task is finished.
I hope I made it somehow clear....
anyways, try this, put the variable in the condition part as well.
Hm ok maybe Ive understood what you mean but so, what kind of profile Ive to make? Everyone is triggered from something, state, event, app, UI...isnt "free", so Ive choosed time...
add condition variable set
Hmm Im closer to a solution, still I cant get the timeframe works. In this new adapation, airplane is set correctly on and off when I turn on and off the screem but, it doesnt consider the timeframe so, if I turn off the screen in the morning, it sets airplane mode on anyway. In attach the new setup...
Edit: if Im not wrong, the red bar on the right means that the conditions are not reached, right? So why even if the bar is red in the airplane on mode, it turns on when the display turns off? ....
here you go, try this on your device at night time. if you have a heart attack, I'm not responsible...
ktmom said:
I think the most reliable way to do this is with three simple profiles.
The first is for the time context. The enter task would set a variable (e.g. %SleepTime) to "true".
The second profile has 2 contexts. The first is to check the previous variable (%SleepTime) is set to "true". The second context is screen off. The task would set a different variable (e.g. %ScreenOff) to true.
The third context checks for (%ScreenOff) is true. The enter task turns on airplane mode. The exit task turns off airplane mode.
The exit task for the first 2 profiles clears the variables.
This could be all handled in one profile using loops and tests for state. IMHO, using 3 profiles is more responsive.
Click to expand...
Click to collapse
alienyd said:
here you go, try this on your device at night time. if you have a heart attack, I'm not responsible...
Click to expand...
Click to collapse
? This just speech... I dont need it Im confused
I have a shake left right task to change my brightness on my phone. I have a BT Connected profile that is set up for connection to my car's Bluetooth that turns off wifi, sets brightness, etc. Problem is if I hit a bump, my brightness changes due to the shaker profile. I've tried multiple ways of setting in my BT Connected profile to toggle the shake left right profile off when connected to my car. Is there a way to do this? If not I have to turn it on and off manually. I apologize if this has been covered somewhere else.
Thanks in advance
Make an "if" condition in your brightness task using %pactive. It should be: if %pactive doesn't match *,yourbtprofilename,*
Good luck
shaggydiamond said:
Make an "if" condition in your brightness task using %pactive. It should be: if %pactive doesn't match *,yourbtprofilename,*
Good luck
Click to expand...
Click to collapse
So this does not seem to be working correctly. I have made a "if" condition, but it either doesn't work or just breaks the shaker all together. I have moved the "if" (line 9) to any and all lines, but it still is not working correctly. For some reason I cannot submit a screen shot, even though I have been on this forum for years...
1. If V
%BRIGHT ~ 255
2. Display Brightness
Level 35
3. Display Timeout
Secs 0 Mins 1 Hours 0
4. Else
5. Variable Set
Name %Bright To %Bright
6. Display Brightness
Level 255
7. Display Timeout
Secs 0 Mins 1 Hours 0
8. End If
9. If V
%pactive !~ BT Connected Bose AE2 Soundlink
Am I missing something?
Thanks again
masked_hacker said:
So this does not seem to be working correctly. I have made a "if" condition, but it either doesn't work or just breaks the shaker all together. I have moved the "if" (line 9) to any and all lines, but it still is not working correctly. For some reason I cannot submit a screen shot, even though I have been on this forum for years...
1. If V
%BRIGHT ~ 255
2. Display Brightness
Level 35
3. Display Timeout
Secs 0 Mins 1 Hours 0
4. Else
5. Variable Set
Name %Bright To %Bright
6. Display Brightness
Level 255
7. Display Timeout
Secs 0 Mins 1 Hours 0
8. End If
9. If V
%pactive !~ BT Connected Bose AE2 Soundlink
Am I missing something?
Thanks again
Click to expand...
Click to collapse
Much better to post the actual profile when it's not working as expected. Make sure it's named - not a default name assigned by tasker. Then long press on the name to highlight the profile. Go to the 3-dot menu and select export -> Description to Clipboard.
Then you'll be able to paste it. Be aware, it easier to use pastebin.com then link to a post here. If you paste in a post here, the forum software will convert all semicolons with characters after, typically "on" and "off" to emoticons making it very hard to read.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
masked_hacker said:
So this does not seem to be working correctly. I have made a "if" condition, but it either doesn't work or just breaks the shaker all together. I have moved the "if" (line 9) to any and all lines, but it still is not working correctly. For some reason I cannot submit a screen shot, even though I have been on this forum for years...
1. If V
%BRIGHT ~ 255
2. Display Brightness
Level 35
3. Display Timeout
Secs 0 Mins 1 Hours 0
4. Else
5. Variable Set
Name %Bright To %Bright
6. Display Brightness
Level 255
7. Display Timeout
Secs 0 Mins 1 Hours 0
8. End If
9. If V
%pactive !~ BT Connected Bose AE2 Soundlink
Am I missing something?
Thanks again
Click to expand...
Click to collapse
Below 9 is where you want your task! With 9 you're saying 'if'. Task #10 and up is your consequence of that. Try a more simpler task to get to know 'if' and 'else'. Then try again with this task. Basically: 'if condition' - task - task - 'end if'. You can put more 'if conditions in between if you want.
masked_hacker said:
I have a shake left right task to change my brightness on my phone. I have a BT Connected profile that is set up for connection to my car's Bluetooth that turns off wifi, sets brightness, etc. Problem is if I hit a bump, my brightness changes due to the shaker profile. I've tried multiple ways of setting in my BT Connected profile to toggle the shake left right profile off when connected to my car. Is there a way to do this? If not I have to turn it on and off manually. I apologize if this has been covered somewhere else.
Thanks in advance
Click to expand...
Click to collapse
In your shaker profile if you have an entry task, add an if statement. In here on the variable side put %PACTIVE and use the matches symbol. Then on the right side put *name of bt profile*
Then after that task add a stop task, then end if task.
What this will do is first check if your using you bt connected profile and stop or go depending on if it's active. I hope this makes sense. If not I'll try to write it out more clearly when I get home. You may not need an entry\exit task for your profile if you only have just a group of tasks just add the if part inside one of those tasks
Hello guys, despite having bought this app for years, I never used it because I was never able to create simple sound profiles.
I'd like to create basic timer tasks like:
- at 23h59 every day, enable DND
- at 7h30 on MTWTF, disable DND, volume at 1, no vibrate mode
+ other tasks based on week day and time of the day.
The thing is, with Tasker, it looks like you have to put an end to a time schedule, but I don't want that. I just don't know when it will ends. If I keep only "from" and don't enable "to", it just goes to midnight, which I don't want.
I wan't a profile to do a one time action at a given time, no end. Is there a way ?
Feel free to answer even in 1 year, I'm sure it would allow me to use this app.
Just use a time profile to set a variable. Then use the variable as the context to trigger the task. You can use a non-time related method (e. g. a widget) to clear the variable to end the task.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
But I don't want to use a widget to end a task. I just want an action to be done at a precise time and that's it.
Nojevah said:
But I don't want to use a widget to end a task. I just want an action to be done at a precise time and that's it.
Click to expand...
Click to collapse
So you want the task to run at a specific time every day? Set the time context start and end times to the same time. It will run every day at that time.
By the way, all of this type of information is available on how to use these contexts and actions in the online [URL="http://tasker.dinglisch.net/userguide/en/" ]user guide[/URL]. Specifically, what I just posted above is on the [URL="http://tasker.dinglisch.net/userguide/en/timecontext.html" ]profile - > time context page [/URL], at the end under notes.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
I've tried this, but it does not work !
If I set a rule: at 07:30 use vibrate mode (with end at 7:30), it will put the phone in vibrate mode (btw it does not always work since tasker is late sometimes and miss the right time and will trigger at 07:32 but that's another problem).
Then at 07:31, it will remove vibrate mode. I never asked for this, but it considers that at 07:31 it has to stop profile and so it has to remove vibrate mode, surely because it considers it was not in vibrate mode before 07:30.
Nojevah said:
I've tried this, but it does not work !
If I set a rule: at 07:30 use vibrate mode (with end at 7:30), it will put the phone in vibrate mode (btw it does not always work since tasker is late sometimes and miss the right time and will trigger at 07:32 but that's another problem).
Then at 07:31, it will remove vibrate mode. I never asked for this, but it considers that at 07:31 it has to stop profile and so it has to remove vibrate mode, surely because it considers it was not in vibrate mode before 07:30.
Click to expand...
Click to collapse
Ok, now we get to the real problem. Long press the profile so it is highlighted then tap the gear icon top, right. Unchecked restore settings.
As far as accurate times, preferences -> monitor -> reliable alarms -> always.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Wow, thanks for this ! I don't know why it's in a hidden setting in "advanced mode", since I prefer to use beginner mode but if it works, I'm fine with this. I'll create my profiles again soon with this new setting.
Concerning "reliable alarms", I had tried this, but it adds an alarm icon in the notification bar, and I don't want that. But that's not a problem, now that I know how to prevent settings to change when profile ends, I'll use a 5 minutes delta between beginning and end.
Thanks for your patience and your useful help !
If you run in beginner mode, you should preface your questions with that info. It limits the things you can do.
As far as the status bar icon goes, in preferences -> monitor, make sure "run in foreground" is checked, set reliable alarms to always and then uncheck "show notification icon".
Is possible you have to take the additional steps described in the pop-up that appears. It's also possible, depending on device and OS, that the Tasker notifications for tasks will also be hidden.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Nojevah said:
...
I'll use a 5 minutes delta between beginning and end.
...
Click to expand...
Click to collapse
If what you mean by this comment is the end time of the profile context will be set 5 minutes after the start time, and you have an exit task, the exit task will run at the end time. The only way to make a time context instantaneous is for the start and end times to be identical.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
This 5 minutes delta is for Tasker to trigger the task, since sometimes it misses the precise time.
For example, if I put
"From 7:30 To 7:30" -> Vibrate mode On
It won't necessarily work since Tasker will miss 7:30 (since I don't use "reliable alarm" because of the alarm clock icon in notification bar next to time). But If I put
"From 7:30 To 7:35" -> Vibrate mode On
It will work. Because Tasker might miss 7:30, but it won't miss 31 or 32 or ... 35
When 7:36 happens, profile is ended, but like it does nothing, I'm good, that's what I want !
So for now, my profiles work great, I'm happy.
That's interesting behavior. What device is this?
The only time I get a clock icon is for future alarms. I disable that in my ROM's settings. Tasker has never impacted that icon on any of my devices.
Running Tasker in foreground causes the Tasker icon to display but using the feature in preferences to disable the icon works for me.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
The phone is a Samsung Galaxy A3 2017.
Here is the clock icon in notification bar (I have the same if I set an alarm in a Clock app): https://i.imgur.com/8jBURTJ.jpg
And if I enable "run in foreground", I have an extra icon thanks to Android 8, and in notification, it's said "Tasker is running in background":
https://i.imgur.com/qJHRvb8.jpg
FWIW, there is a way to hide status bar icons using Tasker. Here a tutorial.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Hi Everyone!
On my Galaxy S9+ running Oreo, I'm getting a similar pop-up window prompt every time I press the sync button:
Turn on Auto sync
Any changes you make to your accounts on the web will be automatically copied to your phone...
I've known about this pop up window ever since my Galaxy S7 (Marshmallow), it annoys the heck out of me. However, using the same code with Tasker and AutoInput doesn't seem to automatically press OK for me like it used to. In a nutshell, an event profile with %WIN (new window, dialog window) with the label "Turn on auto sync" linked to a task to press OK using the AutoInput plugin. There were many user guides created back then about this, such as this one: http://tech-rg.blogspot.com/2016/04/disable-auto-sync-pop-up-message-on.html
Any ideas as to what internally has changed in Oreo that I need to modify to make this work now?
Thanks for your help!
Try flashing the %WIN variable at the start of your task. It's possible that had changed. There have been increasing difficulties picking up the value.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Thanks for the reply. I think this is a lost cause...after looking at the %WIN variable a bit more today, it appears this one no longer works after Google revises the accessibility service. https://www.androidpolice.com/2017/...vices-anything-except-helping-disabled-users/
From another thread...
The only things effected in core Tasker (even with the work-around in place) will be the following few actions:
Events: Button Clicked, Notification Clicked, New Window
Variables: %WIN
Actions: Long Power, Back Button, Toggle App Dock, Quick Settings, Show Recents, Status Bar
Have you tried going to:
Menu -> Preferences -> Monitor -> Display On Monitoring -> App Check Method and selecting "Accessibility"
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini