Page 1 of 1
how do I obtain the contents of the variable access_points?
Posted: 11 Nov 2014 18:19
by andrewb
I am going quite crazy trying to get a list of available wifi access points.
I use the trigger "Wifi Scan results available" but I never get any results in "access_points" but null, even when there is a wifi connected.
I can't even work out if the variable is supposed to be a string or a list.
Can someone *please* post a simple working code example which will display the list of access points either in a message box or even to a log?
Re: how do I obtain the contents of the variable access_poin
Posted: 11 Nov 2014 20:28
by Bushmills
did you execute "WLAN scan" in order to trigger "WLAN scan results available"?
Try this:
http://automagic4android.com/flow.php?i ... 6a86d55959
open the flow, then open WLAN scan action, and from menu, "Execute".
access_points refers to a list, with one list element for each access point.
Re: how do I obtain the contents of the variable access_poin
Posted: 12 Nov 2014 13:51
by andrewb
Thank you for your help but I just can't make this work. I execute the scan; I run the flow. I just get null as the result. The variable {access_points} is always null.
I know there are scan results available because I added a step to the flow to play a chime when the trigger "wifi scan results available" goes off.
This is with Automagic 1.24 running on stock Android 4.4.4 (a different rom on my table, where it doesn't work either)
Re: how do I obtain the contents of the variable access_poin
Posted: 12 Nov 2014 13:55
by Bushmills
The flow should be executed as result of you running the scan. You shouldn't execute the flow manually. At least, when I execute the "Scan" action here on my device, the flow is triggered, and a list of APs displayed.
Re: how do I obtain the contents of the variable access_poin
Posted: 12 Nov 2014 14:04
by andrewb
hang on -- it just worked -- this is with the alarm step added to teh flowl Maybe that slows it down enough.
No: it's now working even without the alarm step. I am mystified. But I thank you enormously for your help.
Re: how do I obtain the contents of the variable access_poin
Posted: 12 Nov 2014 14:06
by andrewb
Wow -- so now I can do what I originally wanted, which is to make a flow that will re-enable all the access points once I lose contact with my home wifi.
Thank you once more.
A