Wifi/Data On/Off

Post your questions and help other users.

Moderator: Martin

Post Reply
waffleguitar
Posts: 1
Joined: 25 May 2015 13:39

Wifi/Data On/Off

Post by waffleguitar » 25 May 2015 13:43

I want to do the following but require help figuring this out:

Launch - 2 applications, eg. Chrome, Youtube
Turn on Wifi
Connect to Network
If network not available
Turn off Wifi
Turn on Data

Inactivity of Data/Wifi of eg. 30seconds
Turn off Wifi/Data

Something along these lines.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Wifi/Data On/Off

Post by Martin » 26 May 2015 19:24

Hi,

-action Launch App can be used to start an app. I recommend to add an action Sleep of a few seconds between the two app launches, otherwise the first app might not be launched at all.
-action Set WiFi State can be used to turn WiFi on/off. It might be enough to add an action Sleep of a few seconds after WiFi has been turned on to wait for the device to establish the connection to a known network.
-condition WiFi Connected allows to check if your device is currently connected to a wifi network.
-action Set Mobile Datanetwork State can be used to turn on/off mobile data. This action requires root on Android 5+.

Detecting network activity is difficult. You could use Init Variables Network Traffic two times with a sleep in between to detect if no data was transferred.

Regards,
Martin

Post Reply