profile to efficiently unfreeze an app after profile's last execution

19 views
Skip to first unread message

N Mok

unread,
May 26, 2016, 10:56:22 AM5/26/16
to Tasker
I have an app that I want to hide Facebook from for various reasons so I'm currently able to issue a "pm disable com.facebook.katana" when I start this app via a simple Tasker profile. the problem is this app gets opened and closed frequently, usually within a couple of minutes and I don't want to constantly freeze/unfreeze Facebook each time the app is opened and closed. instead I'd like to freeze Facebook on the first execution of this app and unfreeze it after 30 seconds if I don't open the app again within those 30 seconds. if I do open the app within those 30 seconds then keep Facebook frozen and wait another 30 seconds after I close the app. how do I go about creating a profile for this and is doing it this way less efficient than some other method as I may be opening/closing the app more than 20 times at any given time.

N Mok

unread,
May 26, 2016, 1:43:32 PM5/26/16
to Tasker
currently have:

Profile App Selection
app starts
L1: Run Shell Command pm disable com.facebook.katana
L2: Variable Set Name %CM To 1
app exits
L1: Variable Set Name %CM To 0

Profile Variable Value %CM Set
L1: If %CM eq 0
L2: Wait 30 seconds
L3: Run Shell Command pm enable com.facebook.katana
L4: Variable Clear Name %CM

not sure why this isn't working at all... the variables look to be getting set, however the Profile for Variable Value %CM Set does not look to be triggering! tested that by using a Flash Notify. what am I missing?
Message has been deleted

N Mok

unread,
May 26, 2016, 3:15:31 PM5/26/16
to Tasker
courtesy of https://www.reddit.com/user/Ratchet_Guy

PROFILE > App > Mystery App


ENTER TASK NAME: "Freeze Facebook"

A1. Stop Task "Un-Freeze Facebook"
A2. Run Shell pm disable com.facebook.katana


EXIT TASK NAME: "Un-Freeze Facebook"

A1. Wait 30 Seconds
A2. Run Shell pm enable com.facebook.katana

 

Then in the Profiles Tab, long click on the Profile itself, click Settings (little slider icon that pops up) and scroll down. UN-check "Enforce Task Order".

This will make sure that while the 30 second timer is running, when you re-enter the Mystery App the Enter Task will run again immediately, stopping the timer.

Reply all
Reply to author
Forward
0 new messages