WifiManager.AddOrUpdatePasspointConfiguration(PasspointConfiguration) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Add or update a Passpoint configuration.
[Android.Runtime.Register("addOrUpdatePasspointConfiguration", "(Landroid/net/wifi/hotspot2/PasspointConfiguration;)V", "GetAddOrUpdatePasspointConfiguration_Landroid_net_wifi_hotspot2_PasspointConfiguration_Handler", ApiSince=26)]
public virtual void AddOrUpdatePasspointConfiguration (Android.Net.Wifi.Hotspot2.PasspointConfiguration? config);
[<Android.Runtime.Register("addOrUpdatePasspointConfiguration", "(Landroid/net/wifi/hotspot2/PasspointConfiguration;)V", "GetAddOrUpdatePasspointConfiguration_Landroid_net_wifi_hotspot2_PasspointConfiguration_Handler", ApiSince=26)>]
abstract member AddOrUpdatePasspointConfiguration : Android.Net.Wifi.Hotspot2.PasspointConfiguration -> unit
override this.AddOrUpdatePasspointConfiguration : Android.Net.Wifi.Hotspot2.PasspointConfiguration -> unit
Parameters
- config
- PasspointConfiguration
The Passpoint configuration to be added
- Attributes
Remarks
Add or update a Passpoint configuration. The configuration provides a credential for connecting to Passpoint networks that are operated by the Passpoint service provider specified in the configuration.
Each configuration is uniquely identified by a unique key which depends on the contents of the configuration. This allows the caller to install multiple profiles with the same FQDN (Fully qualified domain name). Therefore, in order to update an existing profile, it is first required to remove it using WifiManager#removePasspointConfiguration(String)
. Otherwise, a new profile will be added with both configuration.
Deprecated for general app usage - except DO/PO apps. See WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)
to create a passpoint suggestion. See #addNetworkSuggestions(List)
, #removeNetworkSuggestions(List)
for new API to add Wi-Fi networks for consideration when auto-connecting to wifi. <b>Compatibility Note:</b> For applications targeting android.os.Build.VERSION_CODES#R
or above, this API will always fail and throw IllegalArgumentException
.
Deprecation Exemptions: <ul> <li>Device Owner (DO), Profile Owner (PO) and system apps. </ul>
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.