App used to connect ok with previous version (forget which one)
Under 27 the app it will not connect although the tablet itself is connecting.
Manifest
LogCat
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: WifiSSID (from App)
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: scorer_8
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: wifi
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: android.net.wifi.WifiManager@e7ec6b9
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: cm
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: android.net.ConnectivityManager@89d2afe
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: wifi.getWifiState()
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: 3
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: wifiInfo
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: SSID: , BSSID: 02:00:00:00:00:00, MAC: 02:00:00:00:00:00, Supplicant state: COMPLETED, RSSI: -48, Link speed: 11Mbps, Frequency: 2462MHz, Net ID: 2, Metered hint: false, GigaAp: false, VenueName: null, score: 60
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: networkInfo
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: "scorer_8", failover: false, available: true, roaming: false]
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: wifiInfo.getSSID()
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: <unknown ssid>
It appears that networkinfo is seeing the SSID (scorer_8) but getSSID gets "unknown SSID"
Why???? Much examination of Professor Google hasn't helped.
Under 27 the app it will not connect although the tablet itself is connecting.
Manifest
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.scorer.tennis_android">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
Code:
private boolean checkWiFiConnected() {
final WifiManager wifi = (WifiManager) context.getApplicationContext().getSystemService(WIFI_SERVICE);
ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = null;
if (cm != null) {
networkInfo = cm.getActiveNetworkInfo();
}
WifiInfo wifiInfo = null;
if (wifi != null) {
wifiInfo = wifi.getConnectionInfo();
}
L.d("WifiSSID");
L.d(WifiSSID);
L.d("----");
L.d("wifi");
L.d(wifi);
L.d("----");
L.d("cm");
L.d(cm);
L.d("----");
L.d("wifi.getWifiState()");
L.d(wifi.getWifiState());
L.d("----");
L.d("wifiInfo");
L.d(wifiInfo);
L.d("----");
L.d("networkInfo");
L.d(networkInfo);
L.d("----");
L.d("wifiInfo.getSSID()");
L.d(wifiInfo.getSSID());
L.d("----");
LogCat
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: WifiSSID (from App)
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: scorer_8
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: wifi
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: android.net.wifi.WifiManager@e7ec6b9
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: cm
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: android.net.ConnectivityManager@89d2afe
2022-11-19 09:54:13.259 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: wifi.getWifiState()
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: 3
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: wifiInfo
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: SSID: , BSSID: 02:00:00:00:00:00, MAC: 02:00:00:00:00:00, Supplicant state: COMPLETED, RSSI: -48, Link speed: 11Mbps, Frequency: 2462MHz, Net ID: 2, Metered hint: false, GigaAp: false, VenueName: null, score: 60
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: networkInfo
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: "scorer_8", failover: false, available: true, roaming: false]
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: wifiInfo.getSSID()
2022-11-19 09:54:13.260 14771-14771/com.scorer.tennis_android D/>==< Scorer >==<: <unknown ssid>
It appears that networkinfo is seeing the SSID (scorer_8) but getSSID gets "unknown SSID"
Why???? Much examination of Professor Google hasn't helped.