Windows.Devices.Geolocation.Provider Namespace
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.
Some scenarios require a remote location source because the device's physical position doesn't represent the user's real location or the hardware can't provide the needed accuracy. This namespace exposes APIs that let full-trust components publish override positions for Windows location services.
Note
To call location-override APIs, an app must declare the runFullTrust restricted capability.
Important
The Windows.Devices.Geolocation.Provider APIs are part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form.
Classes
| GeolocationProvider |
Provides the ability to override the user's location from a remote source. Note To call location-override APIs, an app must declare the Important The Windows.Devices.Geolocation.Provider APIs are part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form. |
Enums
| LocationOverrideStatus |
Defines constants that specify the status of a call to the location override API. Note To call location-override APIs, an app must declare the Important The Windows.Devices.Geolocation.Provider APIs are part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form. |
Remarks
Use this namespace when you need to override the device-reported location and provide coordinates from a separate source. The APIs target full-trust components that must run alongside the user session to supply high-confidence location data to Windows and any app that consumes location services.
Typical scenarios
- Remote desktop or virtualization products that need to reflect the remote user's actual location.
- Enterprise management tools that supply authoritative location updates during regulated workflows.
- Automated testing harnesses that verify location-aware experiences with deterministic input.
Key types
- GeolocationProvider: Creates override sessions and manages their lifecycle.
- LocationOverrideStatus: Indicates the outcome of override operations.
Important
Override sessions apply system-wide. Always monitor GeolocationProvider.IsOverriddenChanged to detect when another component preempts your session and clean up resources promptly.