How to remove a passpoint configuration configured by the app?

  android, java, networking

I have an app that configures a passpoint network for Android 10/Q and that works fine.
To do that, I am using;

wifiManager.addOrUpdatePasspointConfiguration(passpointConfiguration);

I want to remove it now using with the method below as instructed in the docs;

wifiManager.removePasspointConfiguration(FQDN);

But it does not work since it requires system permissions;

Requires android.Manifest.permission.NETWORK_SETTINGS or android.Manifest.permission.NETWORK_CARRIER_PROVISIONING

I am using the Suggestions API for Android 11/R but cannot use it for Android 10 or lower since the method add a passpoint configuration is only available for Android 11.

Is it common that a new API/class is released and not backwards compatible for at least the previous version? Why do I need to use different classes/API’s to achieve the same result?

wifiManager.addNetwork()

Which is the older method we could use no longer works if you are targeting Android 10 either. So now I can install a profile for Android 10 using the method mentioned earlier but cannot check if it exists or remove it.

Source: Android Questions

LEAVE A COMMENT