Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

WiFiOnDemandHotspotConnectTrigger Class

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.

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

Requirements Description
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

Name Description
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


Feedback

Was this page helpful?