Class TActivityRecognition
Unit
Declaration
type TActivityRecognition = class(TComponent)
Description
Activity recognition (detects user stationary, walking, running and so on) (TActivityRecognition
).
Usage:
Include the necessary integration code in your Android / iOS project.
For iOS, add the "activity_regonition" service inside CastleEngineManifest.xml. See https://castle-engine.io/ios-Services and https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/data/ios/services/activity_recognition/README.md .
Build your project with the Castle Game Engine build tool: https://castle-engine.io/build_tool .
Create an instance of this class. Only a single instance of this class is allowed.
Read TActivityRecognition.Activity, TActivityRecognition.PossibleActivities at any point. You can assign a callback to TActivityRecognition.OnChange to be notified about changes.
Hierarchy
- TObject
- TPersistent
- TComponent
- TActivityRecognition
Overview
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
procedure Start; |
|
procedure Stop; |
Properties
property Started: Boolean read FStarted; |
|
property OnChange: TNotifyEvent read FOnChange write FOnChange; |
|
property ActivityValid: Boolean read FActivityValid; |
|
property Activity: TUserActivity read FActivity; |
|
property PossibleActivities: TUserActivities read FPossibleActivities; |
|
property ActivityTime: TDateTime read FActivityTime; |
|
property ActivityConfidence: TUserActivityConfidence read FActivityConfidence; |
Description
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
procedure Start; |
|
Start recognizing activity. |
procedure Stop; |
|
|
Properties
property Started: Boolean read FStarted; |
|
property OnChange: TNotifyEvent read FOnChange write FOnChange; |
|
Called when current activity changed. This is called right after setting these properties: |
property ActivityValid: Boolean read FActivityValid; |
|
Is some activity detected. Note that the detected activity may still be uaUnknown. |
property Activity: TUserActivity read FActivity; |
|
Last detected most possible activity. Valid only if ActivityValid. |
property PossibleActivities: TUserActivities read FPossibleActivities; |
|
Last detected possible activities. Valid only if ActivityValid. |
property ActivityTime: TDateTime read FActivityTime; |
|
The time activity was updated last. Valid only if ActivityValid. |
property ActivityConfidence: TUserActivityConfidence read FActivityConfidence; |
|
Confidence in Activity and PossibleActivities values. Valid only if ActivityValid. |
Generated by PasDoc 0.16.0.