I would like to create a task that silences my phone when it's plugged in between 9pm and 3am (when I go to bed I plug in my phone and it would be nice if the phone automatically silenced itself).
There are two problems with this:
1) While I have the ability to create a time based context or a USB connected context, I do not see how to create an "and" condition in your context such that you want your task to fire when both those conditions are met. How do you create a context that will trigger off multiple conditions?
Edit SOLVED: Tap the profile tab and tap on a profile you have until it shows the arrow view with a trigger on the left, a task on the right, and a green arrow between. Long press the trigger on the left of the green arrow and a plus icon will show up to add more triggers.
2) When I look at creating a task for silent mode, the only values available are to turn silent mode off or vibrate. I do not see an option for turning silent mode on. What am I missing? How do people turn the phone to silent using Tasker?
Turn volumes down with Tasker in the audio Section.
Sent from my SM-G930F using XDA-Developers mobile app
If you want it to act like a true silent mode by using the method mentioned by @Josh Smith10
What you could do is store the current volume levels, such as ring, media, alarm etc. Into a variable, then when it's time to exit the profile, just set your volume to those variables that you created. Then clear your custom variable after it has restored to that volume.
So this will restore the previous volume level before silent mode kicked in
Related
On the portal news on 2016-03-11 (thanks to @MishaalRahman for this).
This profile requires AlarmPad (either free or Pro version) and will activate your own Night Mode by setting an alarm.
You have to go to work the next morning, are sleeping, dreaming of the ones/things you love and then – BEEEEEEP BEEEEEEP BEEEEEEP – getting woken up by some more or less (most likely less) funny message by one of your friends. Awesome, right? No way… But this comes to an end right now.
Use Alarm Pad in combination with Tasker to set up a Night Mode, where you won’t get disturbed by any loud notification anymore. Activating an alarm will automatically set your phone into silence mode during a specific time, only the alarm is allowed to wake you up. When you dismiss the alarm, the Night Mode will turn itself off automatically. Cool, eh?
So, what do we need? First of all, you have to install AlarmPad (which is a great and customizable alarm clock app with native Tasker integration). Download it by following the above inserted Play Store link and continue with Tasker. Let’s start.
1. First, set up a profile called “Alarm set”. This will set a variable %ALARM to true if the alarm has been set. We need this variable to determine whether an alarm is currently set or not.
Use Event -> Plugin -> AlarmPad and select the Edit button. Choose “Alarm set” and confirm it by clicking the check mark on top right (OPTIONAL: you can choose a specific alarm for this by selecting “Restrict alarm” and then choosing the desired alarm).Create a new task and name it (for example) “Set Alarm VAR”. Create a new variable %ALARM and set it to true.Add Audio->Alarm Volume and set it to your desired value (maximum, if you tend to sleep very deep).Now you are done. You can optionally add a toast notification to verify that the task has been executed, for example Alert -> Flash -> Text “Alarm set”.
2. Create a new profile called “Alarm disabled”. This will set %ALARM to false if the alarm gets disabled manually.
Use Event -> Plugin -> AlarmPad and select the Edit button. Choose “Alarm disabled” and confirm it by clicking the check mark on top right.Create a new task and name it (for example) “Reset Alarm VAR”. Set variable %ALARM to false.Add Audio->Alarm Volume and set it to your desired default alarm value when being outside of your house.Now you are done with it. You can optionally add a toast notification to verify that the task has been executed, for example Alert -> Flash -> Text “Alarm disabled”.
3. Create a new profile called “Alarm playing”. This will set %ALARM to false if the alarm is fired and manually disabled.
Use Event -> Plugin -> AlarmPad and select the Edit button. Choose “Alarm triggered” and confirm it by clicking the check mark on top right.Create a new task and name it (for example) “Reset Alarm VAR”. Set variable %ALARM to false.Add Audio->Alarm Volume and set it to your desired default alarm value when being outside of your house.Now you are done with it.
4. Create a new profile “Night Mode”. This will set your device into silent mode during a specific time interval when an alarm is set.
Use State -> Variables -> Variable Value and enter %Alarm ~ true. Return to your profile and select a new task which you call “Night Mode on”.Add Task -> Wait -> 1 minute. Return to the task menu.Add Task -> If and select “%ALARM ~ true”. Return to the task menu.Add Display -> Display Brightness and set it to 0. Return to the task menu.Add Audio -> Notification Volume and set it to 0. Repeat the same for Media Volume and Ringer Volume. Add Audio -> Alarm Volume and set it to your desired value. This will ensure that no other profile which might be triggered between setting the alarm and starting the Night Mode task has reset your alarm volume.At last, add Task -> End If.That’s it.
5. OPTIONAL: Return to the profile screen and add a trigger event to the profile Night Mode: Time.
Here you can define when the Night Mode will start and when it will end, for example, you set your alarm at 8 p.m., but go to bed at 10 p.m. and don’t want to miss messages until 10 p.m. because of reasons. Then select 10 p.m. as start time and whatever end time you want, for example 10 a.m. (don’t worry, if the alarm is triggered before 10 a.m., the Night Mode will automatically being deactivated and you can receive audio notifications again).
6. Create a new exit task for the profile “Night Mode” and call it “Night Mode off”. This will reset your device from silent mode after the alarm is triggered or manually disabled.
Add Task -> Wait -> 1 minute. Return to the task menu.Add Plugin ->AlarmPad and select AlarmPad perform Action” and select “Disable” (OPTIONAL: select the alarm that is to be disabled). Confirm and return to the task menu.Add Display -> Display Brightness and set it to your default brightness. Return to the task menu.Add Audio -> Notification Volume and set it to your default volume value. Repeat the same for Media Volume and Ringer Volume.That’s it.
Now we have set up Tasker to toggle your own Night Mode automatically depending on your alarm’s status.
That’s all, folks. Have a nice dreaming :good:
I' not sure if i understand it very well. How can we set the audio volumes (notifications, ringer and media) in silence mode only at one specifit hore (21:00 pe). When i disable the alarm the volumes are set to the default configuration that we have on the phone? And how do they turn off (silent mode) again?
joguirian said:
I' not sure if i understand it very well. How can we set the audio volumes (notifications, ringer and media) in silence mode only at one specifit hore (21:00 pe). When i disable the alarm the volumes are set to the default configuration that we have on the phone? And how do they turn off (silent mode) again?
Click to expand...
Click to collapse
Setting an alarm will trigger the Night Mode profile (and its related task Night Mode on, which sets all notification/media/ringer volumes to 0). If you have set up a time-trigger (for example between 10 p.m. and 10 a.m.) the task will only being executed within this time frame. For example, if you set your alarm at 8 p.m. and have the given time frame from 10 p.m. to 10 a.m., the Night Mode will only being executed if %ALARM is true and it is past 10 p.m. and before 10 a.m. of the following day.
Disabling the alarm will trigger the exit task (Night Mode off) of the Night Mode profile, thus all volumes are set back to their (pre-defined in exit task Night Mode off)volume level.
If you want to silence your phone at 9 p.m., just use a time trigger for the profile and set 9 p.m. as start and whatever you like as end time.
orville87 said:
Setting an alarm will trigger the Night Mode profile (and its related task Night Mode on, which sets all notification/media/ringer volumes to 0). If you have set up a time-trigger (for example between 10 p.m. and 10 a.m.) the task will only being executed within this time frame. For example, if you set your alarm at 8 p.m. and have the given time frame from 10 p.m. to 10 a.m., the Night Mode will only being executed if %ALARM is true and it is past 10 p.m. and before 10 a.m. of the following day.
Disabling the alarm will trigger the exit task (Night Mode off) of the Night Mode profile, thus all volumes are set back to their (pre-defined in exit task Night Mode off)volume level.
If you want to silence your phone at 9 p.m., just use a time trigger for the profile and set 9 p.m. as start and whatever you like as end time.
Click to expand...
Click to collapse
ok, understood
Thanks
I created Turbo Notify under [ Tasks ]
I created an action named Notify for Turbo Notify
Notify:
Title: Turbo Modes
Text: Toggle CPU Speeds
Under Actions: I added - Plugin / Kernel Aduitor then Configured it to toggle a cpu profile called Maximum.
I added 2 more. basically 3 toggles for Kernel Aduitors profiles.
So then I setup a Profile to work off of Device Boot then pointed it to Turbo Notify
So my question is this. Turbo Modes always comes up when the device boots. But the buttons below it do not always come up. Sometimes they may even go away during device use.
I am new to tasker and am a nub. Just wondering if I am missing something obvious. When I go into tasker then go into Tasks / Turbo Notify There is the action Notify and tap on the Play icon at the bottom left, the buttons show up on the notification. ( lil green light/icon shows up)
Sorry if it is a nub question. But how can I make it active all the time, and start on boot? The notification is always there, just not the buttons.
- Thnx in advance
I created a task to mimic what your doing. The buttons disappeared on me when unlocking the screen after my battery got (very) low. I've not had a lot of time to play with this, but I did notice when the buttons were missing, the notification did not look like it was expanded. They came back after a few notification drawer open/close cycles.
Still, I don't think you're doing anything wrong. Some thoughts;
Do you have icons assigned to the notification and each button? If not, try adding them.
Is "run in foreground" checked in the preferences -> monitor settings?
Yes I have icons assigned. Built-In ones. And yes to "run in foreground"
I have the priorities set to max, I don't know if that makes a difference.
Like I said I am new to tasker, I'm wondering if i overlooked something simple. Dunno.
Hi,
recently I noticed this strange behavior in Tasker: after a certain profile exits, the volumes are NOT reset back to their old values.
I created a sample profile, which is triggered by a variable %Test. The enter task would set alarm volume to 1 (current volume is at 6). The restoration setting of the profile is on.
When %Test triggered, volume was set correctly. Then when I changed %Test, the profile exited as expected, restoration process kicked in, alarm volume was restored, however not to 6 but 5.
Looking carefully at the log and also the animation on the sound setting screen, I could notice 2 changes made. The volume was set to 6, THEN quicly to 5.
Why?! Enter task set it once, and exit task reset it twice - at you can clearly see at the top of the screenshot.
Anybody can shed some light here?
Thanks.
With my Pixel 3 I could set it to automatically go into Do Not Disturb during a calendar event (such as a meeting). I can't find this setting on the S10. Is it there, or is there an app that will do it automatically?
TahoeTexan said:
With my Pixel 3 I could set it to automatically go into Do Not Disturb during a calendar event (such as a meeting). I can't find this setting on the S10. Is it there, or is there an app that will do it automatically?
Click to expand...
Click to collapse
You can set this up in Tasker. It's a bit of a learning curve to create each scenario you want, but it can work very well.
I currently have it changing my sound mode to Vibrate and media volume to 1 when I connect to my work's WiFi. And then it will change the sound mode to Normal and media volume Max when I connect to my car's bluetooth.
I'm using Bixby Routines to set separate Do Not Disturb rules - one for weekends and one for weekdays. Surprised Samsung didn't include this ability in the Do Not Disturb settings like the Pixels have.
There is so much do not disturb customization in this version of android or perhaps specific to oneplus. I am not sure which. That I'm not sure how to make this do what I'm used to it doing on my previous device LG G4. During the day I have it more or less as follows I may be forgetting some things:
Only ring if the phone call is from someone in my contacts.
Text messages always sound etc no matter who sent them.
Email always sounds.
Calendar always sounds.
What I need is the profile to silence everything while I sleep. To do this on the LG G4 I had a sleep profile from 12am to 12pm that set all volume controls to zero. And somehow though I can't remember ended that sleep profile early if I had an alarm go off during that time frame so that I could be disturbed because I was no longer sleeping after the alarm went off. The reason for the 12am to 12pm time frame was to give leeway to time going to bed and also time for waking up without an alarm. The idea was so that I didn't forget to silence things before going to be and forget to undo that once I was awake.
So typically DND settings built into android allow at least close to this level of control. I'm not sure how Oxygen OS is configured, but on a Pixel I can configure DND to ring only for starred contacts, but allow text and other notifications through. Or, silence everything.
All of that said, you should be able to manage volume levels through Tasker, reject (send to voicemail) calls that are not in your contacts.
If you import your old profile, doesn't it work on the OnePlus?
ktmom said:
So typically DND settings built into android allow at least close to this level of control. I'm not sure how Oxygen OS is configured, but on a Pixel I can configure DND to ring only for starred contacts, but allow text and other notifications through. Or, silence everything.
All of that said, you should be able to manage volume levels through Tasker, reject (send to voicemail) calls that are not in your contacts.
If you import your old profile, doesn't it work on the OnePlus?
Click to expand...
Click to collapse
Stupid me I forgot to backup my old tasker stuff so I have to start from scratch again.
In the do not disturb setting UI of the settings UI there are the following:
Toggle DND on/off: this is toggled on and is set to stay on all the time.
Behavior heading
Notifications: tapping it opens a new UI giving you some default choices for notifications in general. I have this set to no sound at all. And override DND in specific areas outside of this part of settings regarding notifications from SMS/MMS messages, email, voicemail, calendar alarms. Might be one or two I am forgetting to mention.
Exception heading
Calls: tapping here brings up settings to allow calls from (anyone, contacts only, starred contacts only, none.) I have this set to contacts only.
Messages: same detail as calls. Set same as calls.
Other sounds: toggles to allow alarms, media, and touch sounds. I have these toggled to allow.
As for the other stuff that overrides DND I accessed that setting from within each of the apps settings. Not sure if that was a redirect from the app settings to a system settings area that I'm not aware of how to get to otherwise. So what I need is a profile that will mute everything while I sleep and return to how everything is currently set. On the LG G4 I accomplished this by turning all volumes to zero for sleep and then restored them all to 100% upon either the end time trigger of the sleep profile on upon an alarm I set to get up before the end of the timeframe of the profile.
What I was wondering if this was the way to go or if a more simple toggle one setting would accomplish it. I didn't see any DND setting in the system setting for no interruptions at all despite the overrides set. What I'm thinking is the same approach as before and set media, notification, ringer, and system volumes to zero and restore to 100% at end. The part I can't remember how I did it was ending the sleep profile when an alarm goes off that I set to a time prior to the end of the timeframe of the profile. Any idea how I would have done that?
I think which ever way gets you where you want to be is the way to go [emoji6]
On my Google phone, that's the ability to mute everything except alarms. There is also a toggle to disable DND when an alarm goes off.
As far as using tasker to turn volumes back up when an alarm goes off, my way of doing that is to intercept the notification for the alarm. Again, I'm using Google clock, and the way the notifications work may be different on your device.
Here is a taskernet share of a basic project using a notification intercept of the Google Clock alarm. Because there can be namespace collisions with imported projects, I append a variant of my username into variables, task and project names.
For everything to work the way it did I would need the sleep profile to end when an alarm goes off. The problem is I can't remember how that was done. I don't see an end condition that can be added to the sleep profile. The actual sleep profile is the only part I can remember enough to have replicated at this point. It being a from 12am to 12pm with a start task that turns all the volumes down to zero and an end task that turns them all back up. The alarm part I can't recall how it was done.
What was wrong with the notification intercept I shared?
That particular project was to put a large dismiss/snooze on the screen for a low vision individual, but it intercepts the alarm firing notification (for Google clock) and as I already said, intercepting the notification is the way I would do it.
It looks like it is a nice project, but it is requiring a plug-in. However the toggle was made before didn't require any additional things to be added. Isn't there a native event or state that a profile can trigger when an alarm goes off?
I assumed you tried using the native alarm clock or alarm done events in a profile and those didn't work. If you haven't, then try them. They don't work on my devices.
You could research java functions to get the next alarm and use the native java function action to then set a profile time context.
Remembered that tasker was designed to be a framework into which functionality could be added through plugins.
One of those is probably what was used on my LG G4. Now to figure out if this was a part of the one profile or a separate profile. I assume 2nd profile as I don't see any way of adding a 2nd end condition to the first. I remember when it was originally designed the conversation arriving at a solution to function as wanted was a long one. What bothered me is that the thread it took place in is missing from the forum it took place in. I even attempted to inquire there again about making it but after a week of no response I figured it was no longer a good place to post at.
StoneRyno said:
One of those is probably what was used on my LG G4. Now to figure out if this was a part of the one profile or a separate profile. I assume 2nd profile as I don't see any way of adding a 2nd end condition to the first. I remember when it was originally designed the conversation arriving at a solution to function as wanted was a long one. What bothered me is that the thread it took place in is missing from the forum it took place in. I even attempted to inquire there again about making it but after a week of no response I figured it was no longer a good place to post at.
Click to expand...
Click to collapse
What do you mean "2nd end condition"? A second context (condition) in the profile? Long press the first context.
The sleep profile uses time condition 12am to 12pm. I only need a 2nd condition that ends it but doesn't impact the start. I know for sure I can do that with a second profile now that I know what I needed to use to as event trigger. I can run a task that toggles off the sleep profile and toggles it back on some hours later to trigger again at 12am. I wasn't sure if the alarm event could be an alternative condition for end so that the sleep profile was 12am to alarm done or 12pm.