@transistorsoft/capacitor-background-geolocation 4.9.4 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +8 -10
- package/android/libs/com/transistorsoft/tslocationmanager/{3.2.10/tslocationmanager-3.2.10.aar → 3.3.1/tslocationmanager-3.3.1.aar} +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.3.1/tslocationmanager-3.3.1.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.3.1/tslocationmanager-3.3.1.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.3.1/tslocationmanager-3.3.1.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.3.1/tslocationmanager-3.3.1.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/{3.2.10/tslocationmanager-3.2.10.pom → 3.3.1/tslocationmanager-3.3.1.pom} +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.3.1/tslocationmanager-3.3.1.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.3.1/tslocationmanager-3.3.1.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.3.1/tslocationmanager-3.3.1.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.3.1/tslocationmanager-3.3.1.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +4 -8
- package/android/libs/com/transistorsoft/{tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar → tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.aar} +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/{tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.pom → tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.pom} +2 -2
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.3.1/tslocationmanager-v21-3.3.1.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/maven-metadata.xml +13 -0
- package/dist/declarations/interfaces/Authorization.d.ts +2 -1
- package/dist/declarations/interfaces/Location.d.ts +25 -1
- package/dist/declarations/interfaces/MotionActivityEvent.d.ts +5 -2
- package/dist/declarations/types.d.ts +16 -0
- package/package.json +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.pom.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.pom.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.pom.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.pom.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.pom.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.pom.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.pom.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.pom.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +0 -17
- package/dist/declarations/Authorization.d.ts +0 -184
- package/dist/declarations/AuthorizationEvent.d.ts +0 -30
- package/dist/declarations/Config.d.ts +0 -2457
- package/dist/declarations/ConnectivityChangeEvent.d.ts +0 -18
- package/dist/declarations/CurrentPositionRequest.d.ts +0 -45
- package/dist/declarations/DeviceInfo.d.ts +0 -33
- package/dist/declarations/DeviceSettings.d.ts +0 -223
- package/dist/declarations/Geofence.d.ts +0 -255
- package/dist/declarations/GeofenceEvent.d.ts +0 -30
- package/dist/declarations/GeofencesChangeEvent.d.ts +0 -22
- package/dist/declarations/HeartbeatEvent.d.ts +0 -20
- package/dist/declarations/HttpEvent.d.ts +0 -313
- package/dist/declarations/Location.d.ts +0 -225
- package/dist/declarations/LocationAuthorizationAlert.d.ts +0 -41
- package/dist/declarations/Logger.d.ts +0 -359
- package/dist/declarations/MotionActivityEvent.d.ts +0 -31
- package/dist/declarations/MotionChangeEvent.d.ts +0 -15
- package/dist/declarations/Notification.d.ts +0 -491
- package/dist/declarations/PermissionRationale.d.ts +0 -31
- package/dist/declarations/ProviderChangeEvent.d.ts +0 -74
- package/dist/declarations/SQLQuery.d.ts +0 -60
- package/dist/declarations/Sensors.d.ts +0 -31
- package/dist/declarations/State.d.ts +0 -51
- package/dist/declarations/Subscription.d.ts +0 -104
- package/dist/declarations/TransistorAuthorizationToken.d.ts +0 -63
- package/dist/declarations/WatchPositionRequest.d.ts +0 -45
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
/// <reference path="../types.d.ts" />
|
|
2
|
-
/// <reference path="./SQLQuery.d.ts" />
|
|
3
|
-
|
|
4
|
-
declare module "@transistorsoft/capacitor-background-geolocation" {
|
|
5
|
-
/**
|
|
6
|
-
* # Logger API
|
|
7
|
-
*
|
|
8
|
-
* The Background Geolocation SDK includes powerful logging features for debugging location-tracking problems. The SDK stores log-entries for a period of [[Config.logMaxDays]] (default `3`). The volume of logging events
|
|
9
|
-
* inserted into the database is controlled via [[Config.logLevel]].
|
|
10
|
-
*
|
|
11
|
-
* For more information, see the 📘[Debugging Guide](github:wiki/Debugging).
|
|
12
|
-
*
|
|
13
|
-
* The `Logger` API is accessed via [[BackgroundGeolocation.logger]] property:
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* let Logger = BackgroundGeolocation.logger;
|
|
18
|
-
* let log = await Logger.getLog();
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* ## Fetching the Logs:
|
|
22
|
-
*
|
|
23
|
-
* Logs can be fetched from the SDK in three ways:
|
|
24
|
-
* 1. [[getLog]]
|
|
25
|
-
* 2. [[emailLog]]
|
|
26
|
-
* 3. [[uploadLog]]
|
|
27
|
-
*
|
|
28
|
-
* ## Inserting your own log messages
|
|
29
|
-
*
|
|
30
|
-
* You can even insert your own log messages into the SDK's Log database using the following methods:
|
|
31
|
-
*
|
|
32
|
-
* | method | logLevel | icon |
|
|
33
|
-
* |--------------|----------|-----------------|
|
|
34
|
-
* |[[error]] |`ERROR` | ❗️ |
|
|
35
|
-
* |[[warn]] |`WARNING` | ⚠️ |
|
|
36
|
-
* |[[debug]] |`DEBUG` | 🐞 |
|
|
37
|
-
* |[[info]] |`INFO` | ℹ️ |
|
|
38
|
-
* |[[notice]] |`INFO` | 🔵 |
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```typescript
|
|
42
|
-
* let Logger = BackgroundGeolocation.logger;
|
|
43
|
-
* BackgroundGeolocation.onLocation((location) => {
|
|
44
|
-
* Logger.debug("Location received in Javascript: " + location.uuid);
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* ## Example Logs
|
|
49
|
-
* ```
|
|
50
|
-
* 09-19 11:12:18.716 ╔═════════════════════════════════════════════
|
|
51
|
-
* 09-19 11:12:18.716 ║ BackgroundGeolocation Service started
|
|
52
|
-
* 09-19 11:12:18.716 ╠═════════════════════════════════════════════
|
|
53
|
-
* 09-19 11:12:18.723 [c.t.l.BackgroundGeolocationService d]
|
|
54
|
-
* 09-19 11:12:18.723 ✅ Started in foreground
|
|
55
|
-
* 09-19 11:12:18.737 [c.t.l.ActivityRecognitionService a]
|
|
56
|
-
* 09-19 11:12:18.737 🎾 Start activity updates: 10000
|
|
57
|
-
* 09-19 11:12:18.761 [c.t.l.BackgroundGeolocationService k]
|
|
58
|
-
* 09-19 11:12:18.761 🔴 Stop heartbeat
|
|
59
|
-
* 09-19 11:12:18.768 [c.t.l.BackgroundGeolocationService a]
|
|
60
|
-
* 09-19 11:12:18.768 🎾 Start heartbeat (60)
|
|
61
|
-
* 09-19 11:12:18.778 [c.t.l.BackgroundGeolocationService a]
|
|
62
|
-
* 09-19 11:12:18.778 🔵 setPace: null → false
|
|
63
|
-
* 09-19 11:12:18.781 [c.t.l.adapter.TSConfig c] ℹ️ Persist config
|
|
64
|
-
* 09-19 11:12:18.794 [c.t.locationmanager.util.b a]
|
|
65
|
-
* 09-19 11:12:18.794 ℹ️ LocationAuthorization: Permission granted
|
|
66
|
-
* 09-19 11:12:18.842 [c.t.l.http.HttpService flush]
|
|
67
|
-
* 09-19 11:12:18.842 ╔═════════════════════════════════════════════
|
|
68
|
-
* 09-19 11:12:18.842 ║ HTTP Service
|
|
69
|
-
* 09-19 11:12:18.842 ╠═════════════════════════════════════════════
|
|
70
|
-
* 09-19 11:12:19.000 [c.t.l.BackgroundGeolocationService onActivityRecognitionResult] still (100%)
|
|
71
|
-
* 09-19 11:12:21.314 [c.t.l.l.SingleLocationRequest$2 onLocationResult]
|
|
72
|
-
* 09-19 11:12:21.314 ╔═════════════════════════════════════════════
|
|
73
|
-
* 09-19 11:12:21.314 ║ SingleLocationRequest: 1
|
|
74
|
-
* 09-19 11:12:21.314 ╠═════════════════════════════════════════════
|
|
75
|
-
* 09-19 11:12:21.314 ╟─ 📍 Location[fused 45.519239,-73.617058 hAcc=15]999923706055 vAcc=2 sAcc=??? bAcc=???
|
|
76
|
-
* 09-19 11:12:21.327 [c.t.l.l.TSLocationManager onSingleLocationResult]
|
|
77
|
-
* 09-19 11:12:21.327 🔵 Acquired motionchange position, isMoving: false
|
|
78
|
-
* 09-19 11:12:21.342 [c.t.l.l.TSLocationManager a] 15.243
|
|
79
|
-
* 09-19 11:12:21.405 [c.t.locationmanager.data.a.c persist]
|
|
80
|
-
* 09-19 11:12:21.405 ✅ INSERT: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
|
|
81
|
-
* 09-19 11:12:21.423 [c.t.l.http.HttpService flush]
|
|
82
|
-
* 09-19 11:12:21.423 ╔═════════════════════════════════════════════
|
|
83
|
-
* 09-19 11:12:21.423 ║ HTTP Service
|
|
84
|
-
* 09-19 11:12:21.423 ╠═════════════════════════════════════════════
|
|
85
|
-
* 09-19 11:12:21.446 [c.t.locationmanager.data.a.c first]
|
|
86
|
-
* 09-19 11:12:21.446 ✅ Locked 1 records
|
|
87
|
-
* 09-19 11:12:21.454 [c.t.l.http.HttpService a]
|
|
88
|
-
* 09-19 11:12:21.454 🔵 HTTP POST: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
|
|
89
|
-
* 09-19 11:12:22.083 [c.t.l.http.HttpService$a onResponse]
|
|
90
|
-
* 09-19 11:12:22.083 🔵 Response: 200
|
|
91
|
-
* 09-19 11:12:22.100 [c.t.locationmanager.data.a.c destroy]
|
|
92
|
-
* 09-19 11:12:22.100 ✅ DESTROY: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
|
|
93
|
-
* 09-19 11:12:55.226 [c.t.l.BackgroundGeolocationService onActivityRecognitionResult] still (100%)
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
interface Logger {
|
|
97
|
-
/**
|
|
98
|
-
* `1`. Used to order results of [[SQLQuery]] descending.
|
|
99
|
-
*/
|
|
100
|
-
ORDER_DESC: SQLQueryOrder;
|
|
101
|
-
/**
|
|
102
|
-
* `-1`. Used to order results of [[SQLQuery]] ascending.
|
|
103
|
-
*/
|
|
104
|
-
ORDER_ASC: SQLQueryOrder;
|
|
105
|
-
/**
|
|
106
|
-
* Inserts an "error" log message into the SDK's log database
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* ```typescript
|
|
110
|
-
* BackgroundGeolocation.logger.error("Something BAD");
|
|
111
|
-
* ```
|
|
112
|
-
*
|
|
113
|
-
* ```
|
|
114
|
-
* E TSLocationManager: [c.t.l.logger.TSLog log]
|
|
115
|
-
* E TSLocationManager: ‼ Something BAD
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
error(message:string):void;
|
|
119
|
-
/**
|
|
120
|
-
* Inserts a "warning" log message into the SDK's log database
|
|
121
|
-
*
|
|
122
|
-
* @example
|
|
123
|
-
* ```typescript
|
|
124
|
-
* BackgroundGeolocation.logger.warn("Something WEIRD");
|
|
125
|
-
* ```
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* ```
|
|
129
|
-
* E TSLocationManager: [c.t.l.logger.TSLog log]
|
|
130
|
-
* E TSLocationManager: ⚠️ Something WEIRD
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
warn(message:string):void;
|
|
134
|
-
/**
|
|
135
|
-
* Inserts a debug log message into the SDK's log database
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```typescript
|
|
139
|
-
* BackgroundGeolocation.logger.debug("This is a debug message");
|
|
140
|
-
* ```
|
|
141
|
-
*
|
|
142
|
-
* ```
|
|
143
|
-
* D TSLocationManager: [c.t.l.logger.TSLog log] This is a debug message
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
debug(message:string):void;
|
|
147
|
-
/**
|
|
148
|
-
* Inserts an "info" log message into the SDK's log database
|
|
149
|
-
*
|
|
150
|
-
* @example
|
|
151
|
-
* ```typescript
|
|
152
|
-
* BackgroundGeolocation.logger.info("Something informative");
|
|
153
|
-
* ```
|
|
154
|
-
*
|
|
155
|
-
* ```
|
|
156
|
-
* E TSLocationManager: [c.t.l.logger.TSLog log]
|
|
157
|
-
* I TSLocationManager: ℹ️ Something informative
|
|
158
|
-
* ```
|
|
159
|
-
*/
|
|
160
|
-
info(message:string):void;
|
|
161
|
-
/**
|
|
162
|
-
* Inserts a "notice" log message into the SDK's log database
|
|
163
|
-
*
|
|
164
|
-
* @example
|
|
165
|
-
* ```typescript
|
|
166
|
-
* BackgroundGeolocation.logger.notice("A Notice");
|
|
167
|
-
* ```
|
|
168
|
-
*
|
|
169
|
-
* ```
|
|
170
|
-
* E TSLocationManager: [c.t.l.logger.TSLog log]
|
|
171
|
-
* I TSLocationManager: 🔵 A Notice
|
|
172
|
-
* ```
|
|
173
|
-
*/
|
|
174
|
-
notice(message:string):void;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Returns the records from log database as a `String`. Provide an optional [[SQLQuery]] to contrain results between dates.
|
|
178
|
-
* @break
|
|
179
|
-
*
|
|
180
|
-
* Depending on the configured [[Config.logLevel]], the plugin can store an *immense* amount of helpful logging information for debugging location-tracking
|
|
181
|
-
* problems.
|
|
182
|
-
*
|
|
183
|
-
* ### ℹ️ See also:
|
|
184
|
-
* - [[Config.logMaxDays]] (default `3` days)
|
|
185
|
-
* - [[Config.logLevel]] (default [[BackgroundGeolocation.LOG_LEVEL_OFF]])
|
|
186
|
-
* - [[emailLog]]
|
|
187
|
-
* - [[uploadLog]]
|
|
188
|
-
* - [[getLog]]
|
|
189
|
-
* - 📘[Debugging Guide](github:wiki/Debugging)
|
|
190
|
-
*
|
|
191
|
-
* @example
|
|
192
|
-
* ```typescript
|
|
193
|
-
* BackgroundGeolocation.logger.getLog().then((log) => {
|
|
194
|
-
* // Warning: this string could be several megabytes.
|
|
195
|
-
* console.log("[log] success: ", log);
|
|
196
|
-
* });
|
|
197
|
-
*
|
|
198
|
-
* // Or constrain results by providing a SQLQuery
|
|
199
|
-
* let Logger = BackgroundGeolocation.logger;
|
|
200
|
-
*
|
|
201
|
-
* let log = await Logger.getLog({
|
|
202
|
-
* start: Date.parse("2019-09-19 11:12"),
|
|
203
|
-
* end: Date.parse("2019-09-19 11:13"),
|
|
204
|
-
* order: Logger.ORDER_ASC,
|
|
205
|
-
* limit: 100
|
|
206
|
-
* });
|
|
207
|
-
* ```
|
|
208
|
-
* ```
|
|
209
|
-
* 09-19 11:12:18.716 ╔═════════════════════════════════════════════
|
|
210
|
-
* 09-19 11:12:18.716 ║ BackgroundGeolocation Service started
|
|
211
|
-
* 09-19 11:12:18.716 ╠═════════════════════════════════════════════
|
|
212
|
-
* 09-19 11:12:18.723 [c.t.l.BackgroundGeolocationService d]
|
|
213
|
-
* 09-19 11:12:18.723 ✅ Started in foreground
|
|
214
|
-
* 09-19 11:12:18.737 [c.t.l.ActivityRecognitionService a]
|
|
215
|
-
* 09-19 11:12:18.737 🎾 Start activity updates: 10000
|
|
216
|
-
* 09-19 11:12:18.761 [c.t.l.BackgroundGeolocationService k]
|
|
217
|
-
* 09-19 11:12:18.761 🔴 Stop heartbeat
|
|
218
|
-
* 09-19 11:12:18.768 [c.t.l.BackgroundGeolocationService a]
|
|
219
|
-
* 09-19 11:12:18.768 🎾 Start heartbeat (60)
|
|
220
|
-
* 09-19 11:12:18.778 [c.t.l.BackgroundGeolocationService a]
|
|
221
|
-
* 09-19 11:12:18.778 🔵 setPace: null → false
|
|
222
|
-
* 09-19 11:12:18.781 [c.t.l.adapter.TSConfig c] ℹ️ Persist config
|
|
223
|
-
* 09-19 11:12:18.794 [c.t.locationmanager.util.b a]
|
|
224
|
-
* 09-19 11:12:18.794 ℹ️ LocationAuthorization: Permission granted
|
|
225
|
-
* 09-19 11:12:18.842 [c.t.l.http.HttpService flush]
|
|
226
|
-
* 09-19 11:12:18.842 ╔═════════════════════════════════════════════
|
|
227
|
-
* 09-19 11:12:18.842 ║ HTTP Service
|
|
228
|
-
* 09-19 11:12:18.842 ╠═════════════════════════════════════════════
|
|
229
|
-
* 09-19 11:12:19.000 [c.t.l.BackgroundGeolocationService onActivityRecognitionResult] still (100%)
|
|
230
|
-
* 09-19 11:12:21.314 [c.t.l.l.SingleLocationRequest$2 onLocationResult]
|
|
231
|
-
* 09-19 11:12:21.314 ╔═════════════════════════════════════════════
|
|
232
|
-
* 09-19 11:12:21.314 ║ SingleLocationRequest: 1
|
|
233
|
-
* 09-19 11:12:21.314 ╠═════════════════════════════════════════════
|
|
234
|
-
* 09-19 11:12:21.314 ╟─ 📍 Location[fused 45.519239,-73.617058 hAcc=15]999923706055 vAcc=2 sAcc=??? bAcc=???
|
|
235
|
-
* 09-19 11:12:21.327 [c.t.l.l.TSLocationManager onSingleLocationResult]
|
|
236
|
-
* 09-19 11:12:21.327 🔵 Acquired motionchange position, isMoving: false
|
|
237
|
-
* 09-19 11:12:21.342 [c.t.l.l.TSLocationManager a] 15.243
|
|
238
|
-
* 09-19 11:12:21.405 [c.t.locationmanager.data.a.c persist]
|
|
239
|
-
* 09-19 11:12:21.405 ✅ INSERT: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
|
|
240
|
-
* 09-19 11:12:21.423 [c.t.l.http.HttpService flush]
|
|
241
|
-
* 09-19 11:12:21.423 ╔═════════════════════════════════════════════
|
|
242
|
-
* 09-19 11:12:21.423 ║ HTTP Service
|
|
243
|
-
* 09-19 11:12:21.423 ╠═════════════════════════════════════════════
|
|
244
|
-
* 09-19 11:12:21.446 [c.t.locationmanager.data.a.c first]
|
|
245
|
-
* 09-19 11:12:21.446 ✅ Locked 1 records
|
|
246
|
-
* 09-19 11:12:21.454 [c.t.l.http.HttpService a]
|
|
247
|
-
* 09-19 11:12:21.454 🔵 HTTP POST: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
|
|
248
|
-
* 09-19 11:12:22.083 [c.t.l.http.HttpService$a onResponse]
|
|
249
|
-
* 09-19 11:12:22.083 🔵 Response: 200
|
|
250
|
-
* 09-19 11:12:22.100 [c.t.locationmanager.data.a.c destroy]
|
|
251
|
-
* 09-19 11:12:22.100 ✅ DESTROY: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
|
|
252
|
-
* 09-19 11:12:55.226 [c.t.l.BackgroundGeolocationService onActivityRecognitionResult] still (100%)
|
|
253
|
-
*```
|
|
254
|
-
*/
|
|
255
|
-
getLog(query?:SQLQuery): Promise<string>;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Email the result of [[getLog]] using device's mail client.
|
|
259
|
-
*
|
|
260
|
-
* @example
|
|
261
|
-
* ```typescript
|
|
262
|
-
* let Logger = BackgroundGeolocation.logger;
|
|
263
|
-
* Logger.emailLog("foo@bar.com").then((success) => {
|
|
264
|
-
* console.log("[emailLog] success");
|
|
265
|
-
* }).catch((error) => {
|
|
266
|
-
* console.log("[emailLog] FAILURE: ", error);
|
|
267
|
-
* });
|
|
268
|
-
*
|
|
269
|
-
* // Or constrain results by providing a SQLQuery
|
|
270
|
-
* Logger.emailLog("foo@bar.com", {
|
|
271
|
-
* start: Date.parse("2019-09-19"),
|
|
272
|
-
* end: Date.parse("2019-09-20"),
|
|
273
|
-
* order: Logger.ORDER_ASC,
|
|
274
|
-
* limit: 1000
|
|
275
|
-
* });
|
|
276
|
-
* ```
|
|
277
|
-
* ### ℹ️ See also:
|
|
278
|
-
* - [[Config.logLevel]]
|
|
279
|
-
* - [[getLog]]
|
|
280
|
-
* - [[uploadLog]]
|
|
281
|
-
* - 📘[Debugging Guide](github:wiki/Debugging).
|
|
282
|
-
*/
|
|
283
|
-
emailLog(email:string, query?:SQLQuery): Promise<boolean>;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Upload the result of [[getLog]] to provided url. Provide an optional [[SQLQuery]] to contrain results between dates. The file-upload
|
|
287
|
-
* request will attach your configured [[Config.headers]] for authentication.
|
|
288
|
-
*
|
|
289
|
-
* ## Example
|
|
290
|
-
*
|
|
291
|
-
* ```typescript
|
|
292
|
-
* BackgroundGeolocation.logger.uploadLog("https://my.server.com/users/123/logs").then((success) => {
|
|
293
|
-
* console.log("[uploadLog] success");
|
|
294
|
-
* }).catch((error) => {
|
|
295
|
-
* console.log("[uploadLog] FAILURE:", error);
|
|
296
|
-
* });
|
|
297
|
-
*
|
|
298
|
-
* // Or constrain results by providing a [SQLQuery]:
|
|
299
|
-
* BackgroundGeolocation.logger.uploadLog("https://my.server.com/users/123/logs", {
|
|
300
|
-
* start: Date.parse("2019-10-20 09:00"),
|
|
301
|
-
* end: Date.parse("2019-10-20 11:59")
|
|
302
|
-
* }).then((success) => {
|
|
303
|
-
* console.log("[uploadLog] success");
|
|
304
|
-
* }).catch((error) => {
|
|
305
|
-
* console.log("[uploadLog] FAILURE:", error);
|
|
306
|
-
* });
|
|
307
|
-
* ```
|
|
308
|
-
*
|
|
309
|
-
* ## MultiPart File Upload
|
|
310
|
-
* The SDK will upload the gzipped log-file to your server as a *Multi-part* file upload, the same log-file as used in [[emailLog]]. This is what I see with my [Node server](https://github.com/transistorsoft/background-geolocation-console) at `request.files`:
|
|
311
|
-
*
|
|
312
|
-
* ```typescript
|
|
313
|
-
* app.post("/log", async function(req, res) {
|
|
314
|
-
* console.log("[body]: ", req.body);
|
|
315
|
-
* console.log("[files]: ", req.files);
|
|
316
|
-
* res.status(200).send();
|
|
317
|
-
* });
|
|
318
|
-
* ```
|
|
319
|
-
* 
|
|
320
|
-
*
|
|
321
|
-
* ## Form Part
|
|
322
|
-
*
|
|
323
|
-
* In addition to the log-file, the SDK will upload a form as well, containing the following parameters:
|
|
324
|
-
*
|
|
325
|
-
* | Key | Value |
|
|
326
|
-
* |--------------|------------------------------------------|
|
|
327
|
-
* | **`state`** | *JSON-encoded result of SDK's `#getState`*|
|
|
328
|
-
* | **`model`** | *Device model* |
|
|
329
|
-
* | **`manufacturer`** | *Device manufacturer* |
|
|
330
|
-
* | **`platform`** | *iOS or Android* |
|
|
331
|
-
* | **`version`** | *OS version* |
|
|
332
|
-
*
|
|
333
|
-
* ### ℹ️ See also:
|
|
334
|
-
* - [[Config.logLevel]]
|
|
335
|
-
* - [[getLog]]
|
|
336
|
-
* - [[emailLog]]
|
|
337
|
-
* - [[destroyLog]]
|
|
338
|
-
* - 📘[Debugging Guide](github:wiki/Debugging).
|
|
339
|
-
*/
|
|
340
|
-
uploadLog(url:string, query?:SQLQuery): Promise<boolean>;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Destroy the entire contents of SDK's log database.
|
|
344
|
-
*
|
|
345
|
-
* @example
|
|
346
|
-
* ```typescript
|
|
347
|
-
* BackgroundGeolocation.logger.destroyLog();
|
|
348
|
-
* ```
|
|
349
|
-
*
|
|
350
|
-
* ### ℹ️ See also:
|
|
351
|
-
* - [[Config.logLevel]]
|
|
352
|
-
* - [[getLog]]
|
|
353
|
-
* - [[emailLog]]
|
|
354
|
-
* - [[uploadLog]]
|
|
355
|
-
* - 📘[Debugging Guide](github:wiki/Debugging)
|
|
356
|
-
*/
|
|
357
|
-
destroyLog(): Promise<boolean>;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
declare module "@transistorsoft/capacitor-background-geolocation" {
|
|
2
|
-
/**
|
|
3
|
-
* The event-object provided to [[BackgroundGeolocation.onActivityChange]]. Also attached to each recorded [[Location]].
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* BackgroundGeolocation.onActivityChange(activityChangeEvent => {
|
|
8
|
-
* console.log("[activitychange] ", activityChangeEvent.activity, activityChangeEvent.confidence);
|
|
9
|
-
* });
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
interface MotionActivityEvent {
|
|
13
|
-
/**
|
|
14
|
-
* The reported device motion activity.
|
|
15
|
-
*
|
|
16
|
-
* | Activity Name |
|
|
17
|
-
* |----------------|
|
|
18
|
-
* | `still` |
|
|
19
|
-
* | `walking` |
|
|
20
|
-
* | `on_foot` |
|
|
21
|
-
* | `running` |
|
|
22
|
-
* | `on_bicycle` |
|
|
23
|
-
* | `in_vehicle` |
|
|
24
|
-
*/
|
|
25
|
-
activity: string;
|
|
26
|
-
/**
|
|
27
|
-
* Confidence of the reported device motion activity in %.
|
|
28
|
-
*/
|
|
29
|
-
confidence: number;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare module "@transistorsoft/capacitor-background-geolocation" {
|
|
2
|
-
/**
|
|
3
|
-
* The event-object provided to [[BackgroundGeolocation.onMotionChange]] when the SDK changes state between *moving* and *stationary*.
|
|
4
|
-
*/
|
|
5
|
-
interface MotionChangeEvent {
|
|
6
|
-
/**
|
|
7
|
-
* `true` when the device has begun *moving* and the SDK engaged location-tracking. `false` when *stationary*.
|
|
8
|
-
*/
|
|
9
|
-
isMoving: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* The corresponding [[Location]] where the event occurred.
|
|
12
|
-
*/
|
|
13
|
-
location: Location;
|
|
14
|
-
}
|
|
15
|
-
}
|