Kit > healthstack.kit.task.activity.predefined > TappingSpeedActivityTask

TappingSpeedActivityTask

[androidJvm]
class TappingSpeedActivityTask(val id: String, val taskId: String, val name: String = "Tapping Speed", val description: String, completionTitle: String, completionDescription: List<String>?, val steps: List<Step<out StepModel, *>> = listOf(
SimpleViewActivityStep(
id, name,
TappingSpeedIntroModel(
id, name
)
),
SimpleViewActivityStep(
id, name,
TappingSpeedIntroModel(
id, name,
body = "Place your phone on a flat surface.\n" +
"Use two fingers on right hand to alternatively tap the buttons on the screen.\n" +
"Keep tapping for 10 seconds.",
buttonText = "Start Exercise"
)
),
TappingSpeedMeasureStep(
id, name,
TappingSpeedMeasureModel(
id, name, null, measureTimeSecond = 10
)
),
SimpleViewActivityStep(
id, name,
TappingSpeedIntroModel(
id, name,
body = "Place your phone on a flat surface.\n" +
"Use two fingers on left hand to alternatively tap the buttons on the screen.\n" +
"Keep tapping for 10 seconds.",
drawableId = R.drawable.ic_left_tapping_speed,
buttonText = "Start Exercise"
)
),
TappingSpeedMeasureStep(
id, name,
TappingSpeedMeasureModel(
id, name, null, false, 10
)
),
SimpleViewActivityStep(
id, name,
TappingSpeedResultModel(
id, name, header = completionTitle, body = completionDescription
)
)
), isCompleted: Boolean = false, isActive: Boolean = true) : ActivityTask

Constructors

TappingSpeedActivityTask

[androidJvm]
fun TappingSpeedActivityTask(id: String, taskId: String, name: String = "Tapping Speed", description: String, completionTitle: String, completionDescription: List<String>?, steps: List<Step<out StepModel, *>> = listOf( SimpleViewActivityStep( id, name, TappingSpeedIntroModel( id, name ) ), SimpleViewActivityStep( id, name, TappingSpeedIntroModel( id, name, body = "Place your phone on a flat surface.\n" + "Use two fingers on right hand to alternatively tap the buttons on the screen.\n" + "Keep tapping for 10 seconds.", buttonText = "Start Exercise" ) ), TappingSpeedMeasureStep( id, name, TappingSpeedMeasureModel( id, name, null, measureTimeSecond = 10 ) ), SimpleViewActivityStep( id, name, TappingSpeedIntroModel( id, name, body = "Place your phone on a flat surface.\n" + "Use two fingers on left hand to alternatively tap the buttons on the screen.\n" + "Keep tapping for 10 seconds.", drawableId = R.drawable.ic_left_tapping_speed, buttonText = "Start Exercise" ) ), TappingSpeedMeasureStep( id, name, TappingSpeedMeasureModel( id, name, null, false, 10 ) ), SimpleViewActivityStep( id, name, TappingSpeedResultModel( id, name, header = completionTitle, body = completionDescription ) ) ), isCompleted: Boolean = false, isActive: Boolean = true)

Functions

Name Summary
CardView

[androidJvm]
@Composable
open override fun CardView(onClick: () -> Unit)
A method for rendering CardView UI.

equals

[androidJvm]
open operator override fun equals(other: Any?): Boolean

hashCode

[androidJvm]
open override fun hashCode(): Int

Render

[androidJvm]
@Composable
open override fun Render()
A method for rendering UI.

Properties

Name Summary
callback

[androidJvm]
var callback: () -> Unit? = null
a method handling task's state when it is finished

canceled

[androidJvm]
var canceled: () -> Unit? = null
a method handling task's state when it is canceled

description

[androidJvm]
val description: String
concise description of task

id

[androidJvm]
val id: String
id

isActive

[androidJvm]
var isActive: Boolean = true

isCompleted

[androidJvm]
var isCompleted: Boolean = false
flag for completion of task

name

[androidJvm]
val name: String
name

pageCallbacks

[androidJvm]
open override val pageCallbacks: CallbackCollection
An object including callback.

result

[androidJvm]
val result: MutableMap<String, Any>

startedAt

[androidJvm]
var startedAt: LocalDateTime? = null

steps

[androidJvm]
val steps: List<Step<out StepModel, *>>

taskId

[androidJvm]
val taskId: String