setLiveDataSource method

GemError setLiveDataSource()

Set the position service current datasource to live.

Returns

Throws

  • An exception if it fails.

Implementation

GemError setLiveDataSource() {
  final String resultString = GemKitPlatform.instance.callObjectMethod(
    jsonEncode(<String, dynamic>{
      'id': 0,
      'class': 'PositionService',
      'method': 'selectPositionDataSource',
      'senseDataSourceType': 'live',
    }),
  );
  final dynamic result = jsonDecode(resultString);
  final int errCode = result['gemApiError'];
  return GemErrorExtension.fromCode(errCode);
}