initTrackSDK static method

Future<Result> initTrackSDK({
  1. required String serviceId,
  2. int gatherInterval = 5,
  3. int uploadInterval = 30,
  4. int cacheSize = 20,
  5. int locationMode = LocationMode.HIGHT_ACCURACY,
})

初始化猎鹰SDK

Implementation

static Future<Result> initTrackSDK({
  required String serviceId,
  int gatherInterval = 5, //采集时间间隔 5s,
  int uploadInterval = 30, //上报时间间隔 上报周期设置为30s: 5~50倍
  int cacheSize = 20, //最大缓存 MB
  int locationMode = LocationMode.HIGHT_ACCURACY, //GPS精度
}) async {
  final String? json = await _channel.invokeMethod('initGaodeTrackSDK', {
    "gatherInterval": gatherInterval,
    "uploadInterval": uploadInterval,
    "cacheSize": cacheSize,
    "locationMode": locationMode,
  });
  Result result = Result.fromJson(jsonDecode(json ?? "{}"));
  return result;
}