共用方式為


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

取得您可以訂閱的支援活動清單。

適用於

另請參閱