WifiManager.ACTION_PICK_WIFI_NETWORK not working on Android 13

228 Views Asked by At

Background
We developed an enterprise app using Android Studio that runs in the foreground that restricts user access to any standard android functionality like changing the wi-fi connection etc.

We use the code below to allow the users to change the Wi-Fi connection:

startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK)); 

We also use the following permissions in the AndroidManifest.xml file:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<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_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.NEARBY_WIFI_DEVICES" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />

Issue
Using this method on Android 9 & 10 worked fine for years but now it stopped working with the release of Android 13.

We see the Wi-Fi selection screen appear but it does not list any hotspots not even the one the Android device is connected to.

What are we missing? I am thinking it is some new undocumented permission that we need to add.

Any help will be appreciated. Thanks!

0

There are 0 best solutions below