Issues with Wifi Suggestion Android API

Calling a function within the unity player main activity.
public void addConfiguredNetworks()
{
WifiNetworkSuggestion suggestion = new
WifiNetworkSuggestion.Builder().setSsid("NETGEAR39").setWpa2Passphrase("passphrase").build();
List suggestionsList = new ArrayList();
suggestionsList.add(suggestion);
mWifiManager.addNetworkSuggestions(suggestionsList);
}

with the following permissions
uses-permission android:name="android.permission.INTERNET" />
uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

https://developer.android.com/guide/topics/connectivity/wifi-suggest
When creating the build and running it I get the following log


Any ideas on how to fix this issue or know if Wifi Suggestions are blocked on the ML2?

Hi @cody.man,

Welcome to the Magic Leap 2 developer forums. We are so grateful to have you here engaging with us.

I have reached out to our team to find out about the compatibility of the WiFi Suggestion Android API with the ML2 headset. I will report back as soon as i learn more.

Best,

El

WiFi Network Suggestions should not be edited in place. You should create new entries for the list and add it. Avoid modifying this list.

Let me know if this helps.

Best,

El

Okay I noticed that this error really only happens after the first suggested network call passes since I was continuously adding the same network. The real issue is the network is never connected to even though is says that it updated the network config. Does the Magic leap have the ability to allow suggested Wi-Fi networks. There is normally a call to ask the user like this
image
Thanks,
Cody M.

Is this a blocker for you? How critical is this fix for you to move forward?

This is a blocker for our company moving forward since were trying to streamline connecting to a Wifi network. It is pretty critical that we get this fix since there is no way to add a Wifi connection programmatically. If magic leap knows another way to add a Wifi connection without needing to leave a immersive application please let us know since the headset is Android 10 based I would use the ACTION_WIFI_ADD_NETWORKS call but that exist only in Android 11 and the Wifi configuration calls was deprecated in Android 10.

Thanks,
Cody M.

Hi @cody.man,

Thank you for this detailed information regarding the severity of this issue. Our team has been informed and we will report back as soon as we have more details.

Best,

El