App Inventor Extensions: WiFi | Pura Vida Apps

App Inventor Extensions


WiFi Manager Extension

See the App Inventor Extensions document about how to use an App Inventor Extension.

For questions about this extension, bug reports and feature requests, please start a new thread in the App Inventor Extensions forum. Thank you.

Dec 22th, 2015: Version 1: initial release.

July 7th, 2016: Version 2: macAddress method added.

Aug 11th, 2016: Version 2a: avoid DX execution failed error: build each extension separately

Nov 27th, 2016: Version 3: BSSID method added

Description

Some useful blocks to use in a wireless lan.
Required permissions: android.permission.ACCESS_WIFI_STATE, android.permission.CHANGE_WIFI_STATE, android.permission.ACCESS_COARSE_LOCATION

Properties


Returns whether Success Message should be suppressed.


Specifies whether Success Message should be suppressed.


Returns whether Warning Message should be suppressed.


Specifies whether Warning Message should be suppressed.

Methods


Return the local IP Address.
Sponsor of this block is Marius. Thank you!


Return the MAC Address of the device.
Sponsor of this block is Niko. Thank you!


Get current WiFi state: true or false.


Enable WiFi.
You can hide the success message after setting the suppressSuccessMessage property to false.


Disable WiFi.
You can hide the success message after setting the suppressSuccessMessage property to false.


Get current WiFi SSID (Service Set Identifier).


Get current WiFi BSSID (the MAC address of the access point).
Thank you burrowmoor for being the sponsor of this method.


Connect to a SSID (Service Set Identifier).
If you provide a non existing SSID or wrong password, this just will be ignored and the device will try to connect to a known SSID instead.

Note: to be able to test this block, you have to build the app, because the permission CHANGE_WIFI_STATE is not available in the companion app. The following error message will occur in the companion app.


Get a list of configured SSIDs (Service Set Identifiers). WiFi must be enabled for this.


Get a list of available SSIDs (Service Set Identifiers). WiFi must be enabled for this.

Note: to be able to test this block, you have to build the app, because the permission CHANGE_WIFI_STATE is not available in the companion app. The following error message will occur in the companion app.

Events


Event indicating that Available SSIDs (Service Set Identifiers) have been scanned.
A list of the available SSIDs is provided in variable availableSSIDs. The SSID having the best signal is provided in variable bestSSID.

Example App: WiFi Test


Test

Tested successfully on Nexus 5 running Android 6.0.1 and Samsung Galaxy Tab 10.1N running Android 4.0.4.

Do you need help with your App Inventor project?

I can help you: for one hour I charge 25 USD.
Please contact me at info [at] puravidaapps [dot] com for details!
For questions about App Inventor, please use the App Inventor forum. Thank you.

Terms and Conditions

Download


If you find this example helpful and you are using it in one of your projects,
be nice and donate a small amount!

Donation amount:

or donate some mBTC to Bitcoin Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Bitcoin

Thank you! Taifun
 

Download TaifunWiFi extension (aix file)
Download WiFi Test (aia file)
Back to top of page ...

Creative Commons License
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.


Home | Snippets | Tutorials | Extensions | News | Forums | Links | Search | Contact