In digital signage, it is often desirable to know the network connection status of the device to decide the appropriate content to play. For example, when network connection is down, it may be desirable to play a locally-stored content before connection is restored.
IAdea's HTML API allows you to access the Android WifiManager (android.net.wifi.WifiManager) to retrieve WiFi-related information.
POST /v2/android.net.wifi.WifiManager/isWifiEnabled
Returns "true" if WiFi is enabled, "false" if not.
Note that an access_token retrieved via oath2/token must be sent via the query string.
POST /v2/android.net.wifi.WifiManager/getConnectionInfo
Returns:
{
"BSSID": string,
"detailedState": getDetailedStateOf(getSupplicantState()).toString(),
"hiddenSSID": boolean,
"ipAddress": number,
"linkSpeed": number,
"macAddress": string,
"networkId": number,
"rssi": number,
"SSID": number,
"supplicantState": getSupplicantState().toString()
}
Comments
0 comments
Article is closed for comments.