ActivitySensorTrigger 类

定义

表示 在 ActivitySensor 接收输入时激活的触发器。 当应用程序需要响应活动传感器时,使用此方法。

public ref class ActivitySensorTrigger sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IActivitySensorTriggerFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ActivitySensorTrigger final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Background.IActivitySensorTriggerFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class ActivitySensorTrigger final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IActivitySensorTriggerFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ActivitySensorTrigger
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Background.IActivitySensorTriggerFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ActivitySensorTrigger
function ActivitySensorTrigger(reportIntervalInMilliseconds)
Public NotInheritable Class ActivitySensorTrigger
继承
Object Platform::Object IInspectable ActivitySensorTrigger
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

构造函数

ActivitySensorTrigger(UInt32)

使用初始 MinimumReportInterval 创建 ActivitySensorTrigger 类的实例。

属性

MinimumReportInterval

获取传感器触发器支持的最小报告间隔。

ReportInterval

获取触发器的报告间隔。

SubscribedActivities

获取或设置触发器订阅的活动列表。

SupportedActivities

获取可订阅的受支持活动的列表。

适用于

另请参阅