Recording Data

The GIZO SDK can automatically detect trips and start recording them if autoStart has been enabled in the GIZO SDK options described in the Intiallization section. However, if you intend to allow the user to manually record a trip, the method below can be used to achieve this:

import * as GizoSdk from "@gizo-sdk/core";
GizoSdk.startRecording({
  mode: "NoCamera",
  stopRecordingSetting: {
    stopRecordingOnLowBatteryLevel: 10,
  },
});

Method Parameters

mode: a string indicating the sensors used to for recording the trip.

stopRecordingSetting: this parameter contains a set of conditions for forcefully stopping the recording of a trip:

stopRecordingOnLowBatteryLevel: a number indicating the battery level (in percentage) below which the recording of the trip must be terminated. For more information, see the Power Saving Process Overview page.

GIZO SDK can automatically determine the end of a trip and terminate the recording if autoStop has been enabled in the GIZO SDK options described in the Intiallization section. However, if you want to allow the user stop a trip manually or alternatively programmatically under certain conditions, the following method can be used:

GizoSdk.stopRecording();

NOTE: autoStart and autoStop function independently. Therefore, even recordings that are initiated manually can be stopped automatically if the autoStop is enabled.

Last updated