Hi,
lets say i want that every time my smartphone connects with the wlan at home bluetooth should be enabled and disabled when i leave the wlan. this is easy to do with tasker.
but when i enable bt manually when i'm not at home, then tasker has nothing to do when i connect to the wlan. but whe i leave it bluetooth will be disabled.
is there any way to prevent bluetooth disable when i've enabled it manually? maybe there is a solution using variables? set a variable from 0 to 1 when bluetooth is enabled manually and not when it enabled automatically via tasker?
Restore settings being enabled in your profile will automatically restore the configuration based on the entry task. Deselect restore settings (long press profile, with it selected tap the cog/gear icon) and expressly restore the settings in your exit task.
In the entry task add a variable set %BTon to "true". Include an "if statement" in the variable set action "if %BLUE does not match on".
Then in the exit task, when you expressly turn off Bluetooth, add an "if statement" to the BT off action so it only runs if the variable "%BTon matches true".
Make sure to add a variable clear for the %BTon variable at the end of your exit task.
Tips
Thanks
Related
Hello all XDA users! I created a project that automatically switches the clock format on your WM watchface whenever you switch between the formats on your phone via system settings.
===Prerequisites===
First and foremost, you need to install the Tasker (I used this on full version but it may work on the trial version) and have Allow External Access enabled, you can do this by doing the following:
Press the 3 dot menu
Click Preferences
Swipe over to Misc and find Allow External Access, then tap it to enable it
Done!
Then you need AutoTools by joaomgcd, you can download it here
Have USB Debugging enabled for ADB configuration for AutoTools
To Enable this, do the following:
Go to Settings
Go to About Device
Find your build number and click it several times until the phone says that you have enabled developer mode
Go into Developer Settings
Click on the tab that sets USB Debugging to enable it
Done!
Have ADB Drivers/Fastbook installed, here are two places that you can download these from but you don't have to download from these: Skipsoft, XDA
Have Installed WatchMaker Premium or Free Version
===About this Project===
What this project does is check if you have booted up your device and if so, it records the current time format your clock is set to. Then it checks if you have changed the format of your clock via broadcast intent, then it compares the previously recorded setting and the new setting, if they do not match, the task sends the new setting to WatchMaker and it changes the format on the watch to the new setting.
===Building the Project===
The first and foremost you MUST do is ensure that you have downloaded and got everything from the prerequisites. Once you have everything, follow the instructions for enabling access to system settings for AutoTools (you HAVE to do this in order for the profile to function correctly, as it needs to read the configuration for the 24hr format switch in the system settings, the profile will ONLY be looking at this setting). Once you have done these, you can move on to making the actual profiles
For the first profile, it will record the current clock format soon after the device boots up
So we must create an Event profile that will trigger soon after the phone finishes booting on, leave Invert unchecked
Now here's what you need for the actions:
Plugins -> AutoTools -> Secure Settings. Then click custom settings and do the following:
Setting Type: System
Name: time_12_24
Input Type: String
Leave Value Blank
Read Setting: Enabled
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24 (its the variable that AutoTools passes for the custom setting). This records the value we got from AutoTools and stores it in a global variable for us to use later on
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Logged Format Time' without quotes, and for text, added 'Log Format: %TIME_FORMAT' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Logged Format Time' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
For the second profile, it will do the actual process of sending the variables to the WatchMaker App
We're going to create a Intent Received profile that will check if the specified broadcast intent has been received. For action, put 'android.intent.action.TIME_SET' without quotes. This will check if the TIME_SET intent has been received
Now here's what you need for the actions:
Task -> If. Set the condition to %TIME_FORMAT is SET. This will check if the global variable we defined in the first profile has something in it (this is for in case that you didn't boot up your device to store the value to the global variable so Tasker does not return an error since there is no value in the variable)
Plugin -> AutoTools -> Secure Settings. Like the same as like time, we're going to be finding that system variable, time_12_24. Just do the exact same steps as listed for the last time we defined this action
Task -> If. This time, set the condition to %time_12_24 does not match (!~) to %TIME_FORMAT. This will make Tasker check if the system format variable we just grabbed in the previous action DOES NOT match the previously recorded variable from our first profile. This is necessary to check because if you have automatic update clock enabled in system settings, that TIME_SET intent gets called whenever the phone updates to the network time, and because of this, we do not want Tasker constantly nagging us that the format has been update, despite that the format is the same as before.
Plugin -> WatchMaker -> WM Send Variable. Set the variable to send to %time_12_24, which is the new format that we switched to and just checked for.
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Time Format Changed' without quotes, and for text, added 'Updated Format to %time_12_24' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Time Format Changed' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
Task -> End If. Close that If stated that we have created so far
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24. This will override the previously recorded value and place the new one in its place in the variable, %TIME_FORMAT
Task -> Stop. Leave everything else blank. This will make Tasker end the task from here
Task -> Else. Leave everything else blank. This basically says that if that system format variable DOES have something in it. This is necessary to check because
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Logged Format Time' without quotes, and for text, added 'Log Format: %time_12_24' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Logged Format Time' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24. This records the value we got from AutoTools and stores it in a global variable for us to use later on.
Task -> End If. Close up the main IF statement that surrounds everything.
One final thing! Make sure that your watchface in WM has this method or something similar (WITH the quotes): '{ttime_12_24}' == '24' and '{dh23z}:{dmz}' or '{dh}:{dmz} {da}'. This sets the clock format to 24hr if the tasker value is 24, and switches to 12hr if the value is 12.
Note: You DO NOT have to have items such as he notification and clock method text to display exactly as I have, as I have designed these for my convenience.
===Download===
The download files are attached below, you can import this by doing the following:
Long-press the little icon that looks like a house at the bottom of the main menu
Press Import
Locate the downloaded file
Tasker should do the rest and import the entire project and the profiles
===Final Notes===
If you have any questions or issues, please feel free to post them here! ^^
I have a profile that when the screen turns on it enables location to battery saving mode for 1 minute the turns off completely. I then have a 2nd profile that turns location to high accuracy when I open Google maps. The problem is my first profile overrides the maps profile and disables location after 1 minute even if maps is open and location changes to high accuracy.
So how can I make my 2nd profile override the first? I feel like it can't be too difficult to do but I can't figure it out.
farquea said:
I have a profile that when the screen turns on it enables location to battery saving mode for 1 minute the turns off completely. I then have a 2nd profile that turns location to high accuracy when I open Google maps. The problem is my first profile overrides the maps profile and disables location after 1 minute even if maps is open and location changes to high accuracy.
So how can I make my 2nd profile override the first? I feel like it can't be too difficult to do but I can't figure it out.
Click to expand...
Click to collapse
Hello my friend.. You need something like in the first profile long press in the name and add second condition to trigger profile... Add Google maps and in selection of app press the invert button... I thing this setup does your work.. Try and tell me!!
Sent from my SM-G900F using XDA Labs
I thought that would work but it didnt Here's my profile.
When Display is On, Location = Battery Saving, Wait 1 Min, Location = Off
If i use the invert, it just turns off the Display On profile but i think the 1 minute timeout is already triggered as its still turning off location 1 minute after even with Maps open even though in Tasker the Display profile doesnt show as active.
I need something to say Wait 1 min unless Maps is open but then what happens when Maps closes, the 1 minute begins? Doing that may not be easy. Is there no way to add weight or priorities to tasks to say the maps profile.
! REALLY horrible way i suppose i could do it is in my maps profile say wait 61 seconds and then set location mode to GPS, so that it reenables if the Display profile has disabled, i just could end up with a small gap of time where location is off.
Here's what you do.
Add an action to both location profiles that (and every profile or task that turns on loc services) sets a timer
set variable LOCATIONtimer=%TIMES+60
Then create a profile with a time context and set the time to activate as %LOCATIONtimer
The task will disable location services.
Now set your maps profile to clear the %LOCATIONtimer variable
(this will prevent the disabling of loc… since the variable has no time, it can't fire)
Then when your battery saving profile activates it will set the timer for 60 secs… but when you activate maps… it will clear the variable, so it won't adjust your loc srvices
Btw… it's a huge battery impact when you do the "app" context as it checks for open apps every two secs.
It's much better to get rid of all app context profils and launch those apps via a tasker shortcut that
1 launches the app
2 then sets a variable eg. isopenMAPS=true
Then set a. If variable value context of isopenMAPS=true then every time that variable is true, you'll know the app was opened, so you can then clear that variable to show you've closed three app
I set in profile task what At a specific time enable wifi and internet radio - that should wake me up.
But if radio don't wake me up I want that few minutes later set/on oryginal alarm clock (where i can set my ring tone or ex. set snooze for 5min/10min or off alarm if I wake up).
I randomly wake up so when i whant that radio wake me up i set time to ON only on tasker profile.
How i can add/what task add to this if I want Get the effect when radio will ON , 5min later clock alarm will ON
try this:
- in profile task, do math on current time, plus x min times 60,
- than convert the result back to normal time format
- do a variable split, splitter empty, to split it by space, to get time only
- you will have to trim possible preceding zero in hour
- than set alarm with the result time
Sorry but You write too complicated for me :|
Can You write this same but maybe on the example and write step by step what to do
Thank so much
Yeah that's far too complicated. Try this.
In your first profile, that turns on your alarm, set a variable %ALARMTIMERCOUNTDOWN =%TIMES+120 (%TIMES is the current time in seconds, and + 120 is two minutes after the current time
Then create a time context profile and click the little tag you change it from time, to variable, and enter %ALARMTIMERCOUNTDOWN as the time.
Then, when the current time=ALARMTIMERCOUNTDOWN the profile will trigger.
Now remember to clear the variable in both exit tasks so if you wake up, the variable will be empty and thus will never trigger
Can You write this step by step. Like this: Go to your profile that turns on your alarm -> in task what enable radio add new variable -> action ("+") -> variables -> add variable - here in "........." write "....... " -> then go to action variable and "set variable" -> ........
In profile I can add new time context and to start time set %ALARMTIMERCOUNTDOWN but i bust add task to this context - what task i should add?
"Now remember to clear the variable in both exit tasks" - I had add variable only on one task "In your first profile, that turns on your alarm, set a variable.... "
someone can help?
gonzolex said:
someone can help?
Click to expand...
Click to collapse
ok, here goes:
new profile1
- trigger: event/date-time/alarm clock: alarm info
- action: set variable %Trigger to %TIMES+120, do math
btw profile2
- trigger: state/variables/values: %TIMES eq %Trigger
- action: do your task
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,
might seem a silly question but it's very annoying while driving that I receive Samsung calendar notifications. While they appear full screen, Waze and music sounds are silenced.
I have to manually dismiss them before all sounds are 'restored'.
I just want to drive without interruptions of the calendar app, anyone know how this can be done? I'm also using Android Auto but don't see any setting that can accomplish this.
thank you
I'm using Tasker and AutoNotifcation for this. I block some notifications and enable the AOD while connected to my cars Bluetooth.
- install both apps
- in Tasker add a task and search for "AutoNotification Block".
- Tap the pen of Configuration and select the apps you want to block the notification for. You can also add the package name manually
- Under "Toggle" set it to "Block"
- go back and set the timeout to none (slide the slider to the most right)
- go back to the task
- go back to the task list
- add a new task, do the same as above but instead of "Block" set the Toggle to "Unblock".
Now you have the needed tasks and you can set the profiles for them.
- In Tasker go to the profile tap and add a new profile, name it whatever you want.
- Tap on "Status" and filter for "Bluetooth connected" (Note: Bluetooth must be enabled while creating the profiles!).
- Name is optional, tap on the magnifying glass for "Address" and select your cars Bluetooth address.
- go back and Tasker will popup a window where you need to assign a task. Assign the "block" task.
- now do the same again but Mark the "Reverse" check mark in the Bluetooth address menu and after this select the "unblock" task.
So, Tasker will tell AutoNotification to block the specific notifications while connected to the Bluetooth device and unblock it if disconnected.
I hope it works for you. I don't know the English menu entries for Tasker since my app is in German, sorry if there's something different.
thanks, great tip : I already bought Tasker a while ago, I'll set it up like that