WiFiOnDemandHotspotConnectTriggerDetails 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.
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.
Represents details of a WiFiOnDemandHotspotConnectTrigger, which is used to notify the app that the user wishes to connect to a specific on-demand hotspot 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 WiFiOnDemandHotspotConnectTriggerDetails sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 983040)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class WiFiOnDemandHotspotConnectTriggerDetails final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 983040)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class WiFiOnDemandHotspotConnectTriggerDetails
Public NotInheritable Class WiFiOnDemandHotspotConnectTriggerDetails
- Inheritance
- Attributes
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
|
Remarks
When run as a result of a WiFiOnDemandHotspotConnectTrigger, your background task code is passed an instance of this class in the IBackgroundTaskInstance.TriggerDetails property.
Properties
| Name | Description |
|---|---|
| RequestedNetwork |
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. Gets a WiFiOnDemandHotspotNetwork object representing the hotspot network that the user is requesting to connect to. 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. |
Methods
| Name | Description |
|---|---|
| Connect() |
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. Notifies the operating system (OS) connection flow to connect to the given hotspot network (a specific SSID/password). 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. |
| ConnectAsync() |
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. Asynchronously notifies the operating system (OS) connection flow to connect to the given hotspot network (a specific SSID/password). 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. |
| ReportError(WiFiOnDemandHotspotConnectStatus) |
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. Notifies the operating system (OS) of an error activating the given hotspot 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. |