• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Profile 'States' - are the entry and exit tasks sequential?

The wifi sometimes disconnects and reconnects very quickly in succession at work. This sometimes causes a weird issue where I can see the home screen but nothing responds. (I lock the phone when not on wifi.)

To attempt a fix I had added a 20 second delay into the task triggered when wifi disconnects so that if it connects again during that time, I can stop it running the rest of the sequence it runs on a real disconnect. So when wifi connects the first thing I do is kill the disconnect task and only continue with the connect task if necessary.

But that's not what's happening, the sequence is below, starting with the exit state.

state exit -> task #2 |------delay-------|
state entry -> task #1

Here's what surprised me: Until task #2 finishes, the task triggered by the entry state #1 won't start. The entry trigger isn't happening on wifi-connected-entry, it's happening when the wif connects and the exit task has completed. Basically after the delay no matter what it is.

Is that expected and is there any way around it?
 
It is unclear what you are trying to accomplish.

The single most confusing aspect of Tasker profiles for me was dealing with Wi-Fi.

I currently use two profiles in that regard. The purpose ... when I am near my Wi-Fi connections Wi-Fi is enabled in my phones. When I am away from my Wi-Fi connections Wi-Fi is disabled in my phones. The reason ... when visiting a customer my phone is not sitting there trying relentlessly to connect to their Wi-Fi network.

The timing was the issue ... the 1 min delay was the solution (recommended by another Android Forums visitor) ...

Profile: tlaOfficeFar
State: Not Wifi Connected [ SSID:TLANET-2.4GHz/TLANET-5GHz MAC:* IP:* ]
Enter: tlaOfficeFarEnter
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: Variable Split [ Name:%WIFII Splitter: Delete Base:Off ]
A3: Perform Task [ Name:tlaWiFiOff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ] If [ %WIFII2 !~ CONNECTION ]

Profile: tlaOfficeNear
State: Wifi Near [ SSID:TLANET-2.4GHz/TLANET-5GHz MAC:* Capabilities:* Min. Activate Signal Level:5 Channel:0 Toggle Wifi:Off ]
Enter: tlaOfficeNearEnter
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: Perform Task [ Name:tlaWiFiOn Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]

... Thom
 
Back
Top Bottom