Dela via


WiFiOnDemandHotspotConnectTrigger Class

Definition

Represents an event that causes a background task to run when the user wishes to connect to a specific on-demand hotspot network.

Your background task code should cast the value of the IBackgroundTaskInstance.TriggerDetails property to WiFiOnDemandHotspotConnectTriggerDetails.

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 WiFiOnDemandHotspotConnectTrigger 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 WiFiOnDemandHotspotConnectTrigger 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 WiFiOnDemandHotspotConnectTrigger : IBackgroundTrigger
function WiFiOnDemandHotspotConnectTrigger()
Public NotInheritable Class WiFiOnDemandHotspotConnectTrigger
Implements IBackgroundTrigger
Inheritance
Object Platform::Object IInspectable WiFiOnDemandHotspotConnectTrigger
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

Constructors

WiFiOnDemandHotspotConnectTrigger()

Initializes a new instance of the WiFiOnDemandHotspotConnectTrigger 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