Support old servers
This commit is contained in:
parent
4e5998da61
commit
eccd2c96d4
1 changed files with 23 additions and 0 deletions
|
|
@ -48,6 +48,29 @@ class Preferences {
|
||||||
maxRecordsToPersist: instance.getBool(buffer) != false ? -1 : 0,
|
maxRecordsToPersist: instance.getBool(buffer) != false ? -1 : 0,
|
||||||
logLevel: bg.Config.LOG_LEVEL_INFO,
|
logLevel: bg.Config.LOG_LEVEL_INFO,
|
||||||
logMaxDays: 1,
|
logMaxDays: 1,
|
||||||
|
locationTemplate: '''{
|
||||||
|
"timestamp": "<%= timestamp %>",
|
||||||
|
"coords": {
|
||||||
|
"latitude": <%= latitude %>,
|
||||||
|
"longitude": <%= longitude %>,
|
||||||
|
"accuracy": <%= accuracy %>,
|
||||||
|
"speed": <%= speed %>,
|
||||||
|
"heading": <%= heading %>,
|
||||||
|
"altitude": <%= altitude %>
|
||||||
|
},
|
||||||
|
"is_moving": <%= is_moving %>,
|
||||||
|
"odometer": <%= odometer %>,
|
||||||
|
"event": "<%= event %>",
|
||||||
|
"battery": {
|
||||||
|
"level": <%= battery.level %>,
|
||||||
|
"is_charging": <%= battery.is_charging %>
|
||||||
|
},
|
||||||
|
"activity": {
|
||||||
|
"type": "<%= activity.type %>"
|
||||||
|
},
|
||||||
|
"_": "&id=${instance.getString(id)}&lat=<%= latitude %>&lon=<%= longitude %>×tamp=<%= timestamp %>&",
|
||||||
|
"extras": {}
|
||||||
|
}'''.split('\n').map((line) => line.trimLeft()).join(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue