我正在使用mauron85 cordova背景地理位置进行跟踪。我将interval和fastInterval设置为2分钟,但插件更新位置的时间为30秒或一些时间为1分钟但未达到准确的间隔。
我的配置对象在下面..
let config = {
desiredAccuracy: 0,
stationaryRadius: 50,
distanceFilter: 50,
notificationTitle: 'Galio is running',
notificationText: 'ENABLED',
foregroundService: true,
debug: false,
locationProvider: 1,
interval: 120000,
fastestInterval: 120000,
url: 'http://...',
httpHeaders: {
"Content-Type": "application/json"
},
postTemplate: {
"UserId": this.UserId,
"LocationData": [
{
"Lat": this.lat,
"Long": this.lng,
"Date": this.cuuDate,
"BatteryPerc": this.batteryLevel
}
]
},
method: 'POST',
autoSync: true,
stopOnTerminate: false,
startOnBoot: true
};
如果我做错了,请告诉我。