bug:BackgroundGeolocation-ionic3控制台中未安装插件错误?

时间:2019-05-01 12:36:11

标签: geolocation ionic3

我已经安装了后台地理定位插件以获取延迟,并且如果我们的手机已锁定,那么很长一段时间,但是对于我来说,每次我正确安装插件但出现错误时我都会收到“未安装插件错误”的提示?

下面我有用于背景地理位置的版本:

starTRack() {
   let config = {
    desiredAccuracy: 0,
    stationaryRadius: 20,
    distanceFilter: 10, 
    debug: true,
    interval: 2000 
  };

  this.backgroundGeolocation.configure(config).subscribe((location) => {

    console.log('BackgroundGeolocation:  ' + location.latitude + ',' + location.longitude);
  }, (err) => {
  console.log(err);
  });

  // Turn ON the background-geolocation system.
  this.backgroundGeolocation.start();
}

  <plugin name="cordova-plugin-mauron85-background-geolocation" spec="^3.0.1">
  "@ionic-native/background-geolocation": "^3.14.0"

0 个答案:

没有答案