提供一个计步器测量所采起的步骤的数目的一个接口。windows
Windows::Devices::Sensorsapp
public ref class Pedometer sealed
The Pedometer class has these events.dom
Event | Description |
---|---|
ReadingChanged | 发生每次计步器 了一种新的价值。 |
The Pedometer class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.async
Method | Description |
---|---|
FromIdAsync | 得到计步器从它的标识符。ide |
GetCurrentReadings | 从计步器传感器获取当前步骤的信息。ui |
GetDefaultAsync | Asynchronously obtains the default pedometer. |
GetDeviceSelector | Gets the device selector. |
GetReadingsFromTriggerDetails | Gets readings from the trigger details in background task. |
GetSystemHistoryAsync(DateTime) | Asynchronously gets sensor readings from a specific time. |
GetSystemHistoryAsync(DateTime,TimeSpan) | Asynchronously gets pedometer readings from a specific time and duration. |
FromIdAsyncthis
得计步器从它的标识符spa
public: static IAsyncOperation<Pedometer>^ FromIdAsync( String^ deviceId )
deviceId Platform::String [C++]orm
Type: IAsyncOperation<Pedometer>接口
Returns the Pedometer object from its identifier.
The Pedometer class has these properties.
Property | Access type | Description |
---|---|---|
Read-only |
Gets the device identifier. | |
Read-only |
The smallest report interval that is supported by this pedometer. | |
Read-only |
Gets the power that the sensor consumes. | |
Read/write |
Gets or sets the current report interval for the pedometer. |
Note
This class is not supported in JavaScript
version 10.0.10240.0 |
|
API contract |
Windows.Foundation.UniversalApiContract, introduced version 1.0 |
Namespace |
Windows.Devices.Sensors Windows::Devices::Sensors [C++] |
Metadata |
Windows.Foundation.UniversalApiContract.winmd |