Udostępnij za pośrednictwem


Pedometer Class

Definition

Provides an interface for a pedometer to measure the number of steps taken.

For an example implemenation, see the pedometer sample.

public ref class Pedometer sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class Pedometer final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class Pedometer
Public NotInheritable Class Pedometer
Inheritance
Object Platform::Object IInspectable Pedometer
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Note

This class is not supported in JavaScript

Version history

Windows version SDK version Value added
1511 10586 GetCurrentReadings
1511 10586 GetReadingsFromTriggerDetails

Properties

DeviceId

Gets the device identifier.

MinimumReportInterval

The smallest report interval that is supported by this pedometer.

PowerInMilliwatts

Gets the power that the sensor consumes.

ReportInterval

Gets or sets the current report interval for the pedometer.

Methods

FromIdAsync(String)

Obtains the pedometer from its identifier.

GetCurrentReadings()

Gets the current step information from the pedometer sensor.

GetDefaultAsync()

Asynchronously obtains the default pedometer.

GetDeviceSelector()

Gets the device selector.

GetReadingsFromTriggerDetails(SensorDataThresholdTriggerDetails)

Gets readings from the trigger details in background task.

GetSystemHistoryAsync(DateTime, TimeSpan)

Asynchronously gets pedometer readings from a specific time and duration.

GetSystemHistoryAsync(DateTime)

Asynchronously gets sensor readings from a specific time.

Events

ReadingChanged

Occurs each time the pedometer reports a new value.

Applies to

See also