Class TActivityRecognition

Unit

Declaration

type TActivityRecognition = class(TComponent)

Description

Activity recognition (detects user stationary, walking, running and so on) (TActivityRecognition).

Usage:

  1. 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 .

  2. Create an instance of this class. Only a single instance of this class is allowed.

  3. Call TActivityRecognition.Start.

  4. 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

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Start;
Public procedure Stop;

Properties

Public property Started: Boolean read FStarted;
Public property OnChange: TNotifyEvent read FOnChange write FOnChange;
Public property ActivityValid: Boolean read FActivityValid;
Public property Activity: TUserActivity read FActivity;
Public property PossibleActivities: TUserActivities read FPossibleActivities;
Public property ActivityTime: TDateTime read FActivityTime;
Public property ActivityConfidence: TUserActivityConfidence read FActivityConfidence;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure Start;

Start recognizing activity.

Public procedure Stop;

Stop recognizing activity.

Properties

Public property Started: Boolean read FStarted;

Was Start called (not followed by Stop).

Public property OnChange: TNotifyEvent read FOnChange write FOnChange;

Called when current activity changed. This is called right after setting these properties:

Public property ActivityValid: Boolean read FActivityValid;

Is some activity detected. Note that the detected activity may still be uaUnknown.

Public property Activity: TUserActivity read FActivity;

Last detected most possible activity. Valid only if ActivityValid.

Public property PossibleActivities: TUserActivities read FPossibleActivities;

Last detected possible activities. Valid only if ActivityValid.

Public property ActivityTime: TDateTime read FActivityTime;

The time activity was updated last. Valid only if ActivityValid.

Public property ActivityConfidence: TUserActivityConfidence read FActivityConfidence;

Confidence in Activity and PossibleActivities values. Valid only if ActivityValid.


Generated by PasDoc 0.16.0-snapshot.