What exactly do you mean?
In android, WiFi connection is managed by the system itself... You cannot connect to a new network (no previous knowledge is ssid and password) without user interference.
also i test and connected to a router with "WiFiConnect" Library on android 4.4 in b4a (without system interface and without saving connection user & pass)
The procedure on the first link is the android system procedure, and the second link, the image is the android WiFi config activity which you can call with an intent BUT the connection itself will only be established by user intervention