Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 9 always returns <unknown ssid> #108

Open
ratman841 opened this issue Oct 9, 2019 · 3 comments
Open

Android 9 always returns <unknown ssid> #108

ratman841 opened this issue Oct 9, 2019 · 3 comments

Comments

@ratman841
Copy link

On a Android device with version 9.0.0, the function NetworkInfo.getSSID() always returns <unknown ssid>

The same code works without issues on a Android 8.x.x device

Is this a known bug?

@ppdbxdawj
Copy link

You can add
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
to AndroidManifest.xml,
and then you need to add
PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION);
maybe it can help you get correct ssid

@iamcxa
Copy link

iamcxa commented Oct 11, 2019

You can add
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
to AndroidManifest.xml,
and then you need to add
PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION);
maybe it can help you get correct ssid

I can confirm this works. it may related to Android 9's changes, you will need to request location permission to get wifi ssid.

@NightWing1998
Copy link

NightWing1998 commented Dec 16, 2019

You can add
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
to AndroidManifest.xml,
and then you need to add
PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION);
maybe it can help you get correct ssid

I can confirm this works. it may related to Android 9's changes, you will need to request location permission to get wifi ssid.

Agreed
But with this you will also have to enable your location while using the application as only then will the data be loaded.
Also I think this issue should be closed as it is more of a trouble with versions of Android and not this package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants