Home > @magiclane/maps-sdk > RecorderBookmarks

RecorderBookmarks class

Provides access to recorded logs and their metadata on the device.

RecorderBookmarks lets you list, inspect, export, import and manage recorded .gm and .mp4 files stored in a logs directory.

Do not instantiate directly; use to obtain an instance bound to a specific folder.

Signature:

export declare class RecorderBookmarks extends GemAutoreleaseObject 

Extends: GemAutoreleaseObject

Properties

Property

Modifiers

Type

Description

protectedLogsList

readonly

string[]

Returns a list of logs that are marked as protected.

Protected logs are excluded from automatic deletion policies.

Methods

Method

Modifiers

Description

create(path)

static

Creates a RecorderBookmarks instance for the provided folder path.

The returned instance is bound to the directory that contains .gm and .mp4 log files. If creating the instance fails (for example when the path is invalid), the method returns null.

deleteLog(logPath)

Deletes the specified log file from the filesystem. Does not delete protected logs.

exportLog(logPath, type, exportedFileName)

Exports a recorded log to a different file format (for example GPX or CSV).

When exportedFileName is omitted the original log name is used. The operation returns a GemError that indicates whether the export succeeded or failed.

getLogDurationInSeconds(logPath)

Returns the duration of an MP4 log file, in seconds.

getLogMetadata(logPath)

Retrieves metadata for a specific log file.

getLogsList(sortOrder, sortType)

Lists all .gm and .mp4 log files in the bound folder.

The list can be sorted by sortOrder and sortType. By default the method returns logs sorted by date in ascending order.

importLog(logPath, importedFileName)

Imports a log file (GPX, NMEA, KML) and stores it in the logs folder in GM format.

If importedFileName is omitted the source filename is used. The returned GemError indicates the outcome of the import.

markLogProtected(logPath)

Marks a GM log as protected to prevent automatic deletion.

This flag stops the system from removing the file during cleanup or retention-based pruning. Only GM logs are supported by this operation.

markLogUploaded(logPath)

Marks a GM log as uploaded.

Use this to indicate that the log has been successfully transmitted to a server; uploader components or UI can then avoid re-uploading it.