Share via


WiFiOnDemandHotspotNetwork.UpdateProperties Method

Definition

Important

Location consent is now required for Wi-Fi BSSID access. For details on how this affects apps using Wi-Fi or location APIs, see Changes to API behavior for Wi-Fi access and location.

Sets on a WiFiOnDemandHotspotNetwork object various properties of the hotspot network, such as battery percentage, display name, availability, and SSID/password. If any property is invalid, UpdateProperties throws an invalid argument exception.

Note

If you want to use this API in a UWP app, and publish your app to the Microsoft Store, then you'll need to request special approval to use the custom capability Microsoft.onDemandHotspotControl_8wekyb3d8bbwe (the On-Demand Network capability). For more info, see Custom capabilities.

The On-Demand Network capability will be made available only to app developers building end-to-end Wi-Fi hotspot scenarios between a tethering-capable hardware device and a Windows PC.

public:
 virtual void UpdateProperties(WiFiOnDemandHotspotNetworkProperties ^ newProperties) = UpdateProperties;
void UpdateProperties(WiFiOnDemandHotspotNetworkProperties const& newProperties);
public void UpdateProperties(WiFiOnDemandHotspotNetworkProperties newProperties);
function updateProperties(newProperties)
Public Sub UpdateProperties (newProperties As WiFiOnDemandHotspotNetworkProperties)

Parameters

newProperties
WiFiOnDemandHotspotNetworkProperties

An object representing the properties to set.

Windows requirements

Requirements Description
App capabilities
onDemandHotspotControl

Remarks

UpdateMetadata should be called regularly by the app, even if no properties have changed. This is to ensure that Windows will show the network in the Wi-Fi available networks list (in other words, so Windows doesn't hide it for being stale). We recommend registering for the WiFiOnDemandHotspotUpdateMetadataTrigger background task and calling UpdateMetadata there.

Applies to