D danebn11 Member Licensed User Dec 29, 2018 #1 Hallo, ich benutze seit ca. 1,5 Jahren die Library MLWifi (https://www.b4x.com/android/forum/threads/simple-wifi-library-updated-v-3-07-09-05-2018.76233/). Bis jetzt funktionierte alles super, aber seid ich ein neues Smartphone (Android 9) habe gibt die Funktion wifi.wifissid nur mehr <unknown ssid> zurück. Hatte jemand von euch schonmal das selbe Problem? Danke für eure Antworten
Hallo, ich benutze seit ca. 1,5 Jahren die Library MLWifi (https://www.b4x.com/android/forum/threads/simple-wifi-library-updated-v-3-07-09-05-2018.76233/). Bis jetzt funktionierte alles super, aber seid ich ein neues Smartphone (Android 9) habe gibt die Funktion wifi.wifissid nur mehr <unknown ssid> zurück. Hatte jemand von euch schonmal das selbe Problem? Danke für eure Antworten
DonManfred Expert Licensed User Longtime User Dec 29, 2018 #2 danebn11 said: (Android 9) habe gibt die Funktion wifi.wifissid nur mehr <unknown ssid> zurück Click to expand... Das geschieht, wenn Du nicht die Berechtigung hast. Neben den poermissions im Manifest MUSS die Berechtigung zur Laufzeit ebenfalls mit Runtimepermission abgefragt werden. https://developer.android.com/about/versions/pie/android-9.0-changes-all Restricted access to Wi-Fi location and connection information In Android 9, the permission requirements for an app to perform Wi-Fi scans are more strict than in previous versions. For details, see Wi-Fi scanning restrictions. Similar restrictions also apply to the getConnectionInfo() method, which returns a WifiInfo object describing the current Wi-Fi connection. You can only use this object's methods to retrieve SSID and BSSID values if the calling app has the following permissions: ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION ACCESS_WIFI_STATE Retrieving the SSID or BSSID also requires location services to be enabled on the device (under Settings > Location). Information removed from Wi-Fi service methods In Android 9, the following events and broadcasts don't receive information about the user's location or personally identifiable data: The getScanResults() and getConnectionInfo() methods from WifiManager. The discoverServices() and addServiceRequest() methods from WifiP2pManager. The NETWORK_STATE_CHANGED_ACTION broadcast. The NETWORK_STATE_CHANGED_ACTION system broadcast from Wi-Fi no longer contains SSID (previously EXTRA_SSID), BSSID (previously EXTRA_BSSID), or connection information (previously EXTRA_NETWORK_INFO). If your app needs this information, call getConnectionInfo() instead. Last edited: Dec 29, 2018
danebn11 said: (Android 9) habe gibt die Funktion wifi.wifissid nur mehr <unknown ssid> zurück Click to expand... Das geschieht, wenn Du nicht die Berechtigung hast. Neben den poermissions im Manifest MUSS die Berechtigung zur Laufzeit ebenfalls mit Runtimepermission abgefragt werden. https://developer.android.com/about/versions/pie/android-9.0-changes-all Restricted access to Wi-Fi location and connection information In Android 9, the permission requirements for an app to perform Wi-Fi scans are more strict than in previous versions. For details, see Wi-Fi scanning restrictions. Similar restrictions also apply to the getConnectionInfo() method, which returns a WifiInfo object describing the current Wi-Fi connection. You can only use this object's methods to retrieve SSID and BSSID values if the calling app has the following permissions: ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION ACCESS_WIFI_STATE Retrieving the SSID or BSSID also requires location services to be enabled on the device (under Settings > Location). Information removed from Wi-Fi service methods In Android 9, the following events and broadcasts don't receive information about the user's location or personally identifiable data: The getScanResults() and getConnectionInfo() methods from WifiManager. The discoverServices() and addServiceRequest() methods from WifiP2pManager. The NETWORK_STATE_CHANGED_ACTION broadcast. The NETWORK_STATE_CHANGED_ACTION system broadcast from Wi-Fi no longer contains SSID (previously EXTRA_SSID), BSSID (previously EXTRA_BSSID), or connection information (previously EXTRA_NETWORK_INFO). If your app needs this information, call getConnectionInfo() instead.
D danebn11 Member Licensed User Dec 29, 2018 #3 Danke jetzt funktioniert es wieder. Allerdings musste ich die Standorteinstellung selbst in den Einstellungen aktivieren. Gibt es eine Möglichkeit, womit die App selbst um Berechtigungen fragt (wie bei vielen anderen Apps)?
Danke jetzt funktioniert es wieder. Allerdings musste ich die Standorteinstellung selbst in den Einstellungen aktivieren. Gibt es eine Möglichkeit, womit die App selbst um Berechtigungen fragt (wie bei vielen anderen Apps)?
DonManfred Expert Licensed User Longtime User Dec 29, 2018 #4 Nein. Du kannst evtl. den User mittels intent zu der Einstellung leiten. Aber er muss die Berechtigung da manuell hinzufügen.
Nein. Du kannst evtl. den User mittels intent zu der Einstellung leiten. Aber er muss die Berechtigung da manuell hinzufügen.