Hello World

Define a callback function to detect when the WiFi connected state has changed.

app.SetOnWifiChange( callback )

The state parameter can be “CONNECTING”, “CONNECTED”, or “DISCONNECTED”. The WiFi ssid is passed on “CONNECTED” only.

See Also: WifiConnect, WifiScan

Example - Detect WiFi Changes

function OnStart()
    app.SetOnWifiChange( OnWifiChange );

function OnWifiChange( state, ssid )
    if( state.EndsWith( "ED" ))
        app.ShowPopup( state + "\n" + ssid );
    else app.ShowProgress( state )
    Copy     Copy All       Run      
function( state, ssid )