Accelerometer.FromIdAsync(String) 方法

定义

从传感器标识符异步获取传感器。

public:
 static IAsyncOperation<Accelerometer ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<Accelerometer> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<Accelerometer> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of Accelerometer)

参数

deviceId
String

Platform::String

winrt::hstring

传感器标识符

返回

从其标识符返回 Accelerometer 对象。

属性

Windows 要求

设备系列
Windows 10 Fall Creators Update (在 10.0.16299.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v5.0 中引入)

适用于