Saturday, May 30, 2015

Leaving work profile for Tasker


I'm using Tasker, and maybe I'm just trying too hard, but I can't seem to set up multiple conditions in the way that I want to. Here's what I'm trying to do:


From M - F (8AM - 5PM), set the phone to silent mode... which is pretty easy. After 5PM rolls around though, I want to kick on the GPS/Network location listener.


If I have left the office, then I want to go ahead and switch off the silent profile, and back to normal. If I haven't yet left the office, I'd like the task to sleep for 15 minutes, and then try again (sometimes I work late).


It's the combination of these two separate tasks that I cannot seem to make work together. Can anyone help me out here?



Answer




Now with your latest details, a raw approach. As you are on a stock ROM, switching GPS might not work out-of-the-box. In case it doesn't work, take a look at the Secure Settings plugin, which should be able to help out.


I assume your raw concept is: 8am to 5pm is work time, and you want different settings during work hours and after leaving work, considering eventual late-work issues. So this should preferably turn out as a single profile: At work do... and After work switch to.... So here's what shoud basically work:




Profile "Work":


Condition:



  • Time from 8am Till 5pm


Task:




  • Audio -> Silent Mode: On


Exit Task:



  • Misc -> GPS: On (might need to be replaced by Secure Settings, see above)


Now we enter a second profile, and you probably do not even need GPS:


Profile: "AfterWork":


Condition:




  • State -> Tasker -> Profile Active: "Work" [x] Invert

  • State -> Phone -> Cell Near: (Scan your work cells) [x] Invert


Task:



  • Audio -> Silent Mode: Off




So you see you neither need GPS nor the 15min wait loop. At 8am the "Work" Profile gets active, and switches your phone to silent mode. As you do not really need GPS, you can define some dummy Exit Task here (e.g. again switching Silent Mode on), as otherwise Tasker would automatically revert to the "before" mode.


The second profile does not even check conditions before "Work" has completed, as Tasker remembers which Profiles are active. After that, it starts monitoring the surrounding mobile cells -- which are either known by the phone as needed for telephony. If none of the surrounding cells match any of the scanned cells, the attached task is executed and Silent Mode turned off.



But why so complicated? Much easier done like this:




Profile "Work":


Condition:



  • Cell Near (Scan your work place mobile cells)


Task:



  • Audio -> Silent Mode: On





Done. No matter what time you are at work, your phone will be silent. And no matter whether you leave work early or late, Silent Mode will be switched off.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...