react-native-network-info
react-native-network-info copied to clipboard
getBSSID is not working in android PIE
i am using "react-native-network-info": "^3.2.2", my react version is "react": "16.0.0-beta.5", "react-native": "0.49.3",
i am using react-native-network-info to get network BSSID this was wasworking fine untill my user update thier Android OS to Android PIE
it always return 02:00:00:00:01:00 in android PIE devices
anyone has any idea about this
Hello,
In fact, the plugins is not working on Android 9. The ssid is <unkwown ssid>
,
Any ideas
I don't have a current android device to try to reproduce the error but have you tried resetting your network settings on your device?
Ok, I found some time to search this issue on Pie. The fact is, since Android Pie, the permission 'android.permission.ACCESS_COARSE_LOCATION' is need to have access to Wifi information.
As, I'm trying to solved it using https://facebook.github.io/react-native/docs/permissionsandroid. I will tell you as soon as finished to implem it.
Source : https://github.com/EspressifApp/EsptouchForAndroid/commit/f467e1ad4838bb924089c5e8c73bc9f9c08aba68
I've tried to add ACCESS_COARSE_LOCATION permission but I still get an error for BSSID and SSID. Did you have success with it?
This does fix the issue. Make sure to add it the the manifest as well as check runtime using PermissionAndroid.
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Also, you have to set your localisation active on your smartphone (turn GPS on).