setExternalDataSource static method
- DataSource dataSource
Configures a custom external data source for providing position samples.
Use this to supply positions from a simulation, log file, or external hardware. The provided DataSource will become the active source for subsequent calls to position, improvedPosition and any registered listeners. Remember to call DataSource.start if the source requires an explicit start.
Parameters
dataSource: The DataSource instance to set as the active source.
Returns
- GemError.success on success.
- GemError.exist if a data source is already set.
- GemError.invalidInput if the provided
dataSourceis invalid.
Also see:
- removeDataSource - To remove the active data source.
- setLiveDataSource - To set the live GPS as data source.
Implementation
static GemError setExternalDataSource(final DataSource dataSource) {
final OperationResult resultString = staticMethod(
'PositionService',
'setExternalDataSource',
args: dataSource.pointerId,
);
return GemErrorExtension.fromCode(resultString['gemApiError']);
}