Pedometer class 计步器类

原创
2017/02/08 00:09
阅读数 295

Pedometer class

提供一个计步器测量所采取的步骤的数目的一个接口。

Windows::Devices::Sensors

Syntax

public ref class Pedometer sealed

Events

The Pedometer class has these events.

Event Description
ReadingChanged 发生每次计步器 了一种新的价值。

Methods

The Pedometer class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

Method Description
FromIdAsync

获得计步器从它的标识符。

GetCurrentReadings

从计步器传感器获取当前步骤的信息。

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.

FromIdAsync

得计步器从它的标识符

public:
static IAsyncOperation<Pedometer>^ FromIdAsync(
  String^ deviceId
)

deviceId  Platform::String [C++]

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

 

 

 

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
1
分享
返回顶部
顶部