Pedometer class 計步器類

Pedometer class

提供一個計步器測量所採起的步驟的數目的一個接口。windows

Windows::Devices::Sensorsapp

Syntax

public ref class Pedometer sealed

Events

The Pedometer class has these events.dom

Event Description
ReadingChanged 發生每次計步器 了一種新的價值。

Methods

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.

 

 


Properties

The Pedometer class has these properties.

Property Access type Description

DeviceId

Read-only

Gets the device identifier.

MinimumReportInterval

Read-only

The smallest report interval that is supported by this pedometer.

PowerInMilliwatts

Read-only

Gets the power that the sensor consumes.

ReportInterval

Read/write

Gets or sets the current report interval for the pedometer.

 

 

Note  

This class is not supported in JavaScript

 

Requirements (Windows 10 device family)

Device family

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

相關文章
相關標籤/搜索