Introduction
An extension that provides basic information about the network connectivity of the device.
When I start making extensions, I made a Network extension, but that only supports API > 28 devices. This extension should work on all versions.
Here are some notes:
-
All blocks marked with a pushpin () in their names in the documentation requires the FineLocation permission. To make it work, drag out a LocationSensor component from the Sensors drawer, and in the Blocks editor, the Screen should ask for the FineLocation permission when the screen initializes.
-
All blocks marked with a hammer () only works in the built application, since the Companion does not have relevant permissions in the Manifest.
-
You might need a 1/10 second delay to load network data.
Package name: com.gordonlu.networkutilities
Version: 1
Release date: 2022-04-26T10:30:00Z
WARNING! This extension is currently still under testing. I am not sure if this works on all devices. If you find any bugs, directly reply below. Thank you!
Documentation
Method blocks
DisableBluetooth
Turns off Bluetooth without user interaction.
EnableBluetooth
Turns on Bluetooth without user interaction.
GetIpAddress
Returns the IP address of the network.
Returns: text
Parameters: useIpV4 = boolean
Is5GHzSupported
Return whether this adapter supports 5 GHz band.
Returns: boolean
IsBluetoothConnected
Checks if Bluetooth is on.
Returns: boolean
IsMobileConnection
Returns true if connection is through mobile connection. If WiFi and mobile is connected, this will return false.
Returns: boolean
IsRoaming
Returns true if the device is using roaming.
Returns: boolean
IsWiFiConnection
Returns true if the connection is through WiFi. If WiFi and mobile is connected, this will return true.
Returns: boolean
WifiBssid
Return the basic service set identifier (BSSID) of the current access point.
Returns: text
WifiFrequency
Returns the current frequency in MHz.
Returns: number (int)
WifiLinkSpeed
Returns the current WiFi link speed in Mbps.
Returns: number (int)
WifiMacAddress
Returns the MAC address used in this WiFi connection.
Returns: text
WifiSignalStrength
Returns the received WiFi signal strength indicator of the current 802.11 network, in dBm.
Returns: number (int)
WifiSsid
Returns the service set identifier (SSID) of the current 802.11 network.
Returns: number (int)
Sample blocks
Downloads
AIX:
com.gordonlu.networkutilities.aix (11.0 KB)
JAVA: (V1)
NetworkUtilities.txt (7.2 KB)
Made with Niotron IDE.
Kindly PM me if you have any questions! Also, if you like my extension, please like it! It takes some effort for me to make it...
Likes tell me the general user feedback of my extension. If you read this extension, please take 20 seconds to drop by and give a like!
If you have any features that you want to add and you know the code, PM me or directly reply below using the button.
If you find any bugs, please reply below.
Gordon Lu