Geolocator.GetGeopositionHistoryAsync Geolocator.GetGeopositionHistoryAsync Geolocator.GetGeopositionHistoryAsync Geolocator.GetGeopositionHistoryAsync Geolocator.GetGeopositionHistoryAsync Method

Definition

Overloads

GetGeopositionHistoryAsync(DateTime) GetGeopositionHistoryAsync(DateTime) GetGeopositionHistoryAsync(DateTime) GetGeopositionHistoryAsync(DateTime) GetGeopositionHistoryAsync(DateTime)

Starts an asynchronous operation to retrieve the location history of the device.

Note

This API is not available to all Windows apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

GetGeopositionHistoryAsync(DateTime, TimeSpan) GetGeopositionHistoryAsync(DateTime, TimeSpan) GetGeopositionHistoryAsync(DateTime, TimeSpan) GetGeopositionHistoryAsync(DateTime, TimeSpan) GetGeopositionHistoryAsync(DateTime, TimeSpan)

Starts an asynchronous operation to retrieve the location history of the device.

Note

This API is not available to all Windows apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

GetGeopositionHistoryAsync(DateTime) GetGeopositionHistoryAsync(DateTime) GetGeopositionHistoryAsync(DateTime) GetGeopositionHistoryAsync(DateTime) GetGeopositionHistoryAsync(DateTime)

Starts an asynchronous operation to retrieve the location history of the device.

Note

This API is not available to all Windows apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

public : static IAsyncOperation<IVectorView<Geoposition>> GetGeopositionHistoryAsync(DateTime startTime)
static IAsyncOperation<IVectorView<Geoposition>> GetGeopositionHistoryAsync(DateTime startTime) const;
public static IAsyncOperation<IReadOnlyList<Geoposition>> GetGeopositionHistoryAsync(DateTimeOffset startTime)
Public Shared Function GetGeopositionHistoryAsync(startTime As DateTimeOffset) As IAsyncOperation<IReadOnlyList<Geoposition>>(Of IVectorView)
Windows.Devices.Geolocation.Geolocator.getGeopositionHistoryAsync(startTime).done( /* Your success and error handlers */ );

Parameters

startTime
DateTimeOffset DateTimeOffset DateTimeOffset

Represents the beginning of the time span for which positions are to be returned.

Returns

IAsyncOperation<IReadOnlyList<Geoposition>> IAsyncOperation<IReadOnlyList<Geoposition>> IAsyncOperation<IReadOnlyList<Geoposition>>

Positions (of type Geoposition ) that were collected during the specified time span.

Additional features and requirements

Capabilities
locationHistory location

Remarks

The GetGeopositionHistoryAsync method allows your app to asynchronously fetch a list of positions that have been collected by location services. Only positions that have been collected since the specified startTime will be returned. If no positions are available from that time span, an empty list will be returned.

This method returns only positions that have already been collected by location services in the last 24 hours; it does not resolve new positions. Specifying a time span that exceeds this 24-hour window will not yield any additional positions.

Location services collects positions only when an app or services queries for the user's location - but no more than once per second. Location history is limited to 3600 positions; if location history isn't cleared by the user, each position will be stored in location history between 1 and 24 hours.

Note

If you use a background task to call this method frequently, it's important to consider the impact that will have on the battery. Although this method doesn't trigger the GPS receiver, processor resources are still required to run the background task.

See also

GetGeopositionHistoryAsync(DateTime, TimeSpan) GetGeopositionHistoryAsync(DateTime, TimeSpan) GetGeopositionHistoryAsync(DateTime, TimeSpan) GetGeopositionHistoryAsync(DateTime, TimeSpan) GetGeopositionHistoryAsync(DateTime, TimeSpan)

Starts an asynchronous operation to retrieve the location history of the device.

Note

This API is not available to all Windows apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.

public : static IAsyncOperation<IVectorView<Geoposition>> GetGeopositionHistoryAsync(DateTime startTime, TimeSpan duration)
static IAsyncOperation<IVectorView<Geoposition>> GetGeopositionHistoryAsync(DateTime startTime, TimeSpan duration) const;
public static IAsyncOperation<IReadOnlyList<Geoposition>> GetGeopositionHistoryAsync(DateTimeOffset startTime, TimeSpan duration)
Public Shared Function GetGeopositionHistoryAsync(startTime As DateTimeOffset, duration As TimeSpan) As IAsyncOperation<IReadOnlyList<Geoposition>>(Of IVectorView)
Windows.Devices.Geolocation.Geolocator.getGeopositionHistoryAsync(startTime, duration).done( /* Your success and error handlers */ );

Parameters

startTime
DateTimeOffset DateTimeOffset DateTimeOffset

Represents the beginning of the time span for which positions are to be returned.

duration
TimeSpan TimeSpan TimeSpan

Represents the length of time after startTime for which positions are to be returned.

Returns

IAsyncOperation<IReadOnlyList<Geoposition>> IAsyncOperation<IReadOnlyList<Geoposition>> IAsyncOperation<IReadOnlyList<Geoposition>>

Positions (of type Geoposition ) that were collected during the specified time span.

Additional features and requirements

Capabilities
locationHistory location

Remarks

Only positions that were collected during the specified duration after startTime will be returned.

See also