importLog method
Import a log file in GM format.
Supported file formats include: GPX, NMEA, KML. If the name of the exported file is not specified, the log name will be used.
Parameters
- IN logPath The path for the file to be imported.
- IN importedFileName The imported file name.
Returns
- GemError.success If operation succeeds.
- GemError.exist If the imported file already exists in the folder.
- GemError.notSupported If the file format is not supported.
- GemError.general If the operation fails.
Throws
- An exception if it fails
Implementation
GemError importLog(final String logPath, {final String? importedFileName}) {
final String resultString = GemKitPlatform.instance.callObjectMethod(
jsonEncode(<String, Object>{
'id': _pointerId,
'class': 'RecorderBookmarks',
'method': 'importLog',
'args': <String, String?>{
'logPath': logPath,
'importedFileName': importedFileName,
},
}),
);
return GemErrorExtension.fromCode(jsonDecode(resultString)['result']);
}