As per Martin example, you can use condition
WIFI Available, and compare the result against a local or a global variable. If you have Android 4.3.x or above, you can also check for available APS without firing up WiFi (this requires to flag an appropriate option in WiFi advanced configuration panel into o.s. settings). The trigger could be timed or "on condition" or a mix of both or whatever good for you.
I have a reatively large set of flows that manage my wifi automatically. Unfortunately they rely on a number of structured variables (lists and the like), some of which need to be initialized manually, at the moment (so it would be a nightmare for other users to figure out how to set them up and for me to support their inevitable questions). As soon as there will be the possibility to export them much like flows, I'll post.
In the attached simple flow you can see a working yet simple pattern to achieve your specific goal. You need only to figure out how to populate the list against which compare the result of the scan. You can do in manually, for example, if you have a relatively stable set of Access Points you normally use, or you can type a list of APs as literals, comma separated, directly into the field, just to speed up your test. Your taste about trigger my be different, so you can change it at will (timed, location, multiple,... whatever). Trigger's only purpose is to evaluate the
WIFI Available condition. This is a stripped down version of my original flow, just to explain the idea and let it work without issues. Nonetheless it works perfectly (when global variable is correctly set).
If you leave the supplied trigger as is, expect the scan to occour every 3-5 minutes, according to my observations
and on my device (Note II). Check on yours and increase-decrease frequency to suit your taste (if you whish to have control over trigger frequency, you
must use a different trigger or combination of triggers)
Please, remember that you
must have 4.3.x, or above, and the wifi scan always on for this flow to work, as per my foreword.
Hope this will help.
http://automagic4android.com/flow.php?i ... 2424b11d37