Udostępnij za pośrednictwem


WiFiOnDemandHotspotUpdateMetadataTrigger Class

Definition

Represents an event that causes a background task to run when the user opens the operating system (OS) Wi-Fi network list, as if to connect to a new Wi-Fi network.

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 ref class WiFiOnDemandHotspotUpdateMetadataTrigger sealed : IBackgroundTrigger
/// [Windows.Foundation.Metadata.Activatable(983040, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 983040)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class WiFiOnDemandHotspotUpdateMetadataTrigger final : IBackgroundTrigger
[Windows.Foundation.Metadata.Activatable(983040, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 983040)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class WiFiOnDemandHotspotUpdateMetadataTrigger : IBackgroundTrigger
function WiFiOnDemandHotspotUpdateMetadataTrigger()
Public NotInheritable Class WiFiOnDemandHotspotUpdateMetadataTrigger
Implements IBackgroundTrigger
Inheritance
Object Platform::Object IInspectable WiFiOnDemandHotspotUpdateMetadataTrigger
Attributes
Implements

Windows requirements

Device family
Windows 11 Insider Preview (introduced in 10.0.23504.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v15.0)
App capabilities
onDemandHotspotControl

Remarks

You should use this as an indication to update the operating system (OS) metadata on the injected network, such as reporting to the OS that the on-demand hotspot should be hidden because the phone is no longer in physical proximity to the Windows device. However, the app is free to report this information at any time, such as when the user unlocks their device.

Constructors

WiFiOnDemandHotspotUpdateMetadataTrigger()

Initializes a new instance of the WiFiOnDemandHotspotUpdateMetadataTrigger class.

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.

Applies to