Pedometer class 计步器类

Pedometer class

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

Windows::Devices::Sensors

Syntax

public ref class Pedometer sealed

Events

The Pedometer class has these events.

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

Methods

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

MethodDescription
FromIdAsync

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

GetCurrentReadings

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

GetDefaultAsyncAsynchronously obtains the default pedometer.
GetDeviceSelectorGets the device selector.
GetReadingsFromTriggerDetailsGets 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.

PropertyAccess typeDescription

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

 

 

 

转载于:https://my.oschina.net/u/2349863/blog/833661

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值