Sdílet prostřednictvím


GeovisitMonitor Class

Definition

Handles the monitoring of a user's Visits when the app is in use (not in the background).

public ref class GeovisitMonitor sealed
/// [Windows.Foundation.Metadata.Activatable(327680, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class GeovisitMonitor final
[Windows.Foundation.Metadata.Activatable(327680, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class GeovisitMonitor
function GeovisitMonitor()
Public NotInheritable Class GeovisitMonitor
Inheritance
Object Platform::Object IInspectable GeovisitMonitor
Attributes

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)
App capabilities
location

Constructors

GeovisitMonitor()

Initializes an instance of GeovisitMonitor.

Properties

MonitoringScope

Gets and the scope of Visits to monitor.

Methods

GetLastReportAsync()

Retrieves the latest Visit-related event the user has completed.

Start(VisitMonitoringScope)

Begins monitoring for Visit-related events.

Stop()

Stops monitoring for Visit-related events.

Events

VisitStateChanged

Raised when the user's current Visit state has changed, provided this GeovisitMonitor is currently monitoring.

Applies to

See also

  • <xref:Windows.Devices.Geolocation.Geovisit%0a%5bGuidelines+for+using+Visits+tracking%5d(%2fwindows%2fuwp%2fmaps-and-location%2fguidelines-for-visits)>