This Initiates the step counter to count the steps. The count will be added to the selected control.
Smartcode
Syntax
StartStepCounter(controlname)
Parameters
- controlname(Required) – name of the control to assign the step value
Example
StartStepCounter(‘txt_stepcount’);
Directcode
this.setState({stepcount:0,config:{
default_threshold : 15.0,
default_delay : 150000000,
cheatInterval : 3000,
onStepCountChange : (stepCount) => { this.setState({stepcount: stepCount}),Orefuncs.SetText(“txt_stepcount”, this.state, this.state.stepcount)},
onCheat : () => { console.log(“User is Cheating”) }
}}, () => {startCounter(this.state.config)})
Note : This method will be accessible only if the Step Counter package is included in the app.