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 getWifiNetworks not providing latest available networks. #30

Open
sardanadeepak opened this issue Dec 10, 2023 · 4 comments
Open

Comments

@sardanadeepak
Copy link

Hello There, I am facing a problem, the getWifiNetworks is not providing latest available wifi networks. I have to go to phone wifi settings and if the new devices are available there then only its giving that results. Its a weird thing I am not able to see latest available devices which I want to connect from my app.

Thank you for any advice in advance

@aboozaid
Copy link
Owner

getWifiNetworks function has a param which forces the device to do a rescan

@sardanadeepak
Copy link
Author

getWifiNetworks function has a param which forces the device to do a rescan

I already used that param but getting the same results. Please let me know if I am doing anything wrong?

const wifiNetworks = await TetheringManager.getWifiNetworks(true);

@aboozaid
Copy link
Owner

Which android version are you using? Did you grant all required permissions?

@sardanadeepak
Copy link
Author

sardanadeepak commented Dec 11, 2023

Which android version are you using? Did you grant all required permissions?

I am using android 12 and 13 for testing.

And these are the permissions which I am giving.
android:name="android.permission.INTERNET" />
android:name="android.permission.NEARBY_WIFI_DEVICES" />
android:name="android.permission.ACCESS_FINE_LOCATION" />
android:name="android.permission.ACCESS_COARSE_LOCATION"
android:name="android.permission.ACCESS_NETWORK_STATE" />
android:name="android.permission.CHANGE_NETWORK_STATE" />
android:name="android.permission.ACCESS_WIFI_STATE" />
android:name="android.permission.CHANGE_WIFI_STATE" />

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

2 participants