@transistorsoft/capacitor-background-geolocation 4.4.2 → 4.4.3

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.
Files changed (52) hide show
  1. package/README.md +255 -61
  2. package/android/libs/com/transistorsoft/tslocationmanager/{3.1.34/tslocationmanager-3.1.34.aar → 3.1.35/tslocationmanager-3.1.35.aar} +0 -0
  3. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.aar.md5 +1 -0
  4. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.aar.sha1 +1 -0
  5. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.aar.sha256 +1 -0
  6. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.aar.sha512 +1 -0
  7. package/android/libs/com/transistorsoft/tslocationmanager/{3.1.34/tslocationmanager-3.1.34.pom → 3.1.35/tslocationmanager-3.1.35.pom} +1 -1
  8. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.pom.md5 +1 -0
  9. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.pom.sha1 +1 -0
  10. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.pom.sha256 +1 -0
  11. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.pom.sha512 +1 -0
  12. package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +4 -6
  13. package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.1.34/tslocationmanager-reverse-3.1.34.aar → 3.1.35/tslocationmanager-reverse-3.1.35.aar} +0 -0
  14. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.aar.md5 +1 -0
  15. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.aar.sha1 +1 -0
  16. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.aar.sha256 +1 -0
  17. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.aar.sha512 +1 -0
  18. package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.1.34/tslocationmanager-reverse-3.1.34.pom → 3.1.35/tslocationmanager-reverse-3.1.35.pom} +1 -1
  19. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.pom.md5 +1 -0
  20. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.pom.sha1 +1 -0
  21. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.pom.sha256 +1 -0
  22. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.pom.sha512 +1 -0
  23. package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +4 -6
  24. package/android/src/main/java/com/transistorsoft/bggeo/capacitor/BackgroundGeolocationPlugin.java +6 -1
  25. package/ios/TSLocationManager.xcframework/Info.plist +5 -5
  26. package/ios/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Info.plist +0 -0
  27. package/ios/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/TSLocationManager +0 -0
  28. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Info.plist +0 -0
  29. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/TSLocationManager +0 -0
  30. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
  31. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
  32. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeResources +1 -1
  33. package/ios/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Info.plist +9 -9
  34. package/ios/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/TSLocationManager +0 -0
  35. package/package.json +1 -1
  36. package/CHANGELOG.md +0 -81
  37. package/android/libs/com/transistorsoft/tslocationmanager/3.1.34/tslocationmanager-3.1.34.aar.md5 +0 -1
  38. package/android/libs/com/transistorsoft/tslocationmanager/3.1.34/tslocationmanager-3.1.34.aar.sha1 +0 -1
  39. package/android/libs/com/transistorsoft/tslocationmanager/3.1.34/tslocationmanager-3.1.34.aar.sha256 +0 -1
  40. package/android/libs/com/transistorsoft/tslocationmanager/3.1.34/tslocationmanager-3.1.34.aar.sha512 +0 -1
  41. package/android/libs/com/transistorsoft/tslocationmanager/3.1.34/tslocationmanager-3.1.34.pom.md5 +0 -1
  42. package/android/libs/com/transistorsoft/tslocationmanager/3.1.34/tslocationmanager-3.1.34.pom.sha1 +0 -1
  43. package/android/libs/com/transistorsoft/tslocationmanager/3.1.34/tslocationmanager-3.1.34.pom.sha256 +0 -1
  44. package/android/libs/com/transistorsoft/tslocationmanager/3.1.34/tslocationmanager-3.1.34.pom.sha512 +0 -1
  45. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.34/tslocationmanager-reverse-3.1.34.aar.md5 +0 -1
  46. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.34/tslocationmanager-reverse-3.1.34.aar.sha1 +0 -1
  47. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.34/tslocationmanager-reverse-3.1.34.aar.sha256 +0 -1
  48. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.34/tslocationmanager-reverse-3.1.34.aar.sha512 +0 -1
  49. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.34/tslocationmanager-reverse-3.1.34.pom.md5 +0 -1
  50. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.34/tslocationmanager-reverse-3.1.34.pom.sha1 +0 -1
  51. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.34/tslocationmanager-reverse-3.1.34.pom.sha256 +0 -1
  52. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.34/tslocationmanager-reverse-3.1.34.pom.sha512 +0 -1
package/README.md CHANGED
@@ -29,6 +29,7 @@ The **[Android module](http://www.transistorsoft.com/shop/products/capacitor-bac
29
29
  ![Settings](https://dl.dropboxusercontent.com/s/8oad228siog49kt/settings-framed-350.png?dl=1)
30
30
 
31
31
  # Contents
32
+ - ### 😫 [Help!](../../wiki/Help)
32
33
  - ### :books: [API Documentation](https://transistorsoft.github.io/capacitor-background-geolocation)
33
34
  - ### [Installing the Plugin](#large_blue_diamond-installing-the-plugin)
34
35
  - ### [Setup Guides](#large_blue_diamond-setup-guides)
@@ -109,92 +110,285 @@ There are three main steps to using `BackgroundGeolocation`
109
110
  2. `#ready` the plugin.
110
111
  3. `#start` the plugin.
111
112
 
113
+ :warning: Do not execute *any* API method which will require accessing location-services until the callback to **`#ready`** executes (eg: `#getCurrentPosition`, `#watchPosition`, `#start`).
114
+
115
+
112
116
  ```javascript
113
- // Import BackgroundGeolocation + any optional interfaces
114
- import BackgroundGeolocation from "@transistorsoft/capacitor-background-geolocation";
117
+ // NO! .ready() has not resolved.
118
+ BackgroundGeolocation.getCurrentPosition(options);
119
+ BackgroundGeolocation.start();
120
+
121
+ BackgroundGeolocation.ready(config).then((state) => {
122
+ // YES -- .ready() has now resolved.
123
+ BackgroundGeolocation.getCurrentPosition(options);
124
+ BackgroundGeolocation.start();
125
+ });
126
+
127
+ // NO! .ready() has not resolved.
128
+ BackgroundGeolocation.getCurrentPosition(options);
129
+ BackgroundGeolocation.start();
130
+ ```
131
+ ---------------------------------------------------------------------------------------------
132
+
133
+ ### Example 1. — *React*
134
+
135
+ <img alt="alt_text" width="50px" src="https://hackr.io/tutorials/react/logo-react.svg?ver=1610114789" />
136
+
137
+ <details>
138
+ <summary>View Source</summary>
139
+
140
+ ```typescript
141
+ import {
142
+ IonContent,
143
+ IonHeader,
144
+ IonPage,
145
+ IonTitle,
146
+ IonToolbar,
147
+ IonButtons,
148
+ IonToggle,
149
+ IonItemDivider,
150
+ IonLabel
151
+ } from '@ionic/react';
152
+
153
+ import React from "react";
154
+
155
+ import BackgroundGeolocation, {
156
+ Subscription
157
+ } from "@transistorsoft/capacitor-background-geolocation";
158
+
159
+ const HelloWorld: React.FC = () => {
160
+ const [ready, setReady] = React.useState(false);
161
+ const [enabled, setEnabled] = React.useState(false);
162
+ const [events, setEvents] = React.useState<any[]>([]);
163
+
164
+ const addEvent = (name: string, event:any) => {
165
+ setEvents(previous => [...previous, {
166
+ name: name,
167
+ json: JSON.stringify(event, null, 2)
168
+ }]);
169
+ }
115
170
 
116
- export class HomePage {
117
-
118
- /// WARNING: DO NOT Use ionViewWillEnter to configure the SDK -- use ngAfterContentInit. ionViewWillEnter only executes when the
119
- /// app is brought to the foreground. It will NOT execute when the app is launched in the background,
120
- /// as the BackgroundGeolocation SDK will often do.
121
- ///
122
- async ngAfterContentInit() {
123
- ////
124
- // 1. Wire up event-listeners
125
- //
126
-
127
- // This handler fires whenever bgGeo receives a location update.
128
- BackgroundGeolocation.onLocation((location) => {
129
- console.log('[onLocation]', location);
130
- }, ((error) => { // <-- Location errors
131
- console.log('[onLocation] ERROR:', error);
132
- });
171
+ React.useEffect(() => {
172
+ /// 1. Subscribe to events.
173
+ const onLocation:Subscription = BackgroundGeolocation.onLocation((location) => {
174
+ addEvent('onLocation', location);
175
+ })
133
176
 
134
- // This handler fires when movement states changes (stationary->moving; moving->stationary)
135
- BackgroundGeolocation.onMotionChange((location) => {
136
- console.log('[onMotionChange]', location);
177
+ const onMotionChange:Subscription = BackgroundGeolocation.onMotionChange((event) => {
178
+ addEvent('onMotionChange', event);
137
179
  });
138
180
 
139
- // This event fires when a change in motion activity is detected
140
- BackgroundGeolocation.onActivityChange((event) => {
141
- console.log('[onActivityChange]', event);
142
- });
181
+ const onActivityChange:Subscription = BackgroundGeolocation.onActivityChange((event) => {
182
+ addEvent('onActivityChange', event);
183
+ })
143
184
 
144
- // This event fires when the user toggles location-services authorization
145
- BackgroundGeolocation.onProviderChange((event) => {
146
- console.log('[onProviderChange]', event);
185
+ const onProviderChange:Subscription = BackgroundGeolocation.onProviderChange((event) => {
186
+ addEvent('onProviderChange', event);
187
+ })
188
+
189
+ /// 2. ready the plugin.
190
+ BackgroundGeolocation.ready({
191
+ // Geolocation Config
192
+ desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
193
+ distanceFilter: 10,
194
+ // Activity Recognition
195
+ stopTimeout: 5,
196
+ // Application config
197
+ debug: true, // <-- enable this hear sounds for background-geolocation life-cycle.
198
+ logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
199
+ stopOnTerminate: false, // <-- Allow the background-service to continue tracking when user closes the app.
200
+ startOnBoot: true, // <-- Auto start tracking when device is powered-up.
201
+ }).then((state) => {
202
+ setReady(true);
203
+ setEnabled(state.enabled)
204
+ addEvent('State', state);
147
205
  });
148
206
 
149
- // See the API docs for a list of all available events -- there are a total of 13 events.
207
+ return () => {
208
+ // Remove BackgroundGeolocation event-subscribers when the View is removed or refreshed
209
+ // during development live-reload. Without this, event-listeners will accumulate with
210
+ // each refresh during live-reload.
211
+ onLocation.remove();
212
+ onMotionChange.remove();
213
+ onActivityChange.remove();
214
+ onProviderChange.remove();
215
+ }
216
+ }, []);
217
+
218
+ /// 3. start / stop BackgroundGeolocation
219
+ React.useEffect(() => {
220
+ if (!ready) { return }
221
+
222
+ if (enabled) {
223
+ BackgroundGeolocation.start();
224
+ } else {
225
+ BackgroundGeolocation.stop();
226
+ setEvents([]);
227
+ }
228
+ }, [enabled]);
229
+
230
+ return (
231
+ <IonPage>
232
+ <IonHeader>
233
+ <IonToolbar>
234
+ <IonButtons slot="end">
235
+ <IonLabel>Toggle to <code>{(enabled ? 'stop()' : 'start()')}</code> &mdash;&gt;</IonLabel>
236
+ <IonToggle checked={enabled} onIonChange={e => setEnabled(e.detail.checked)}/>
237
+ </IonButtons>
238
+ </IonToolbar>
239
+ </IonHeader>
240
+ <IonContent fullscreen>
241
+ <div style={{padding:10}}>
242
+ { events.slice().reverse().map((event, i) => (
243
+ <div key={i}>
244
+ <p><strong>{event.name}</strong></p>
245
+ <small><pre><code>{event.json}</code></pre></small>
246
+ <IonItemDivider />
247
+ </div>
248
+ ))}
249
+ </div>
250
+ </IonContent>
251
+ </IonPage>
252
+ )
253
+ }
254
+ ```
150
255
 
151
- ////
152
- // 2. Execute #ready method (required)
153
- //
256
+ </details>
257
+
258
+ ---------------------------------------------------------------------------------------------
259
+
260
+ ### Example 2. &mdash; *Angular*
261
+
262
+ <img alt="alt_text" width="55px" src="https://dl.dropbox.com/s/w4hw88clxqmlis2/angular-logo.svg?dl=1" />
263
+
264
+ <details>
265
+ <summary>View Source</summary>
266
+
267
+ ```typescript
268
+ import {
269
+ Component,
270
+ NgZone,
271
+ OnDestroy
272
+ } from '@angular/core'
273
+
274
+ import BackgroundGeolocation, {
275
+ Location,
276
+ Subscription
277
+ } from "@transistorsoft/capacitor-background-geolocation";
278
+
279
+ @Component({
280
+ selector: 'hello-world',
281
+ template: `
282
+ <ion-header>
283
+ <ion-toolbar>
284
+ <ion-buttons slot="end">
285
+ <ion-label>Toggle to <code>{{(enabled ? 'stop()' : 'start()')}}</code> &mdash;&gt;</ion-label>
286
+ <ion-toggle [(ngModel)]="enabled" (ionChange)="onToggleEnabled()" style="display:block;"></ion-toggle>
287
+ </ion-buttons>
288
+ </ion-toolbar>
289
+ </ion-header>
290
+ <ion-content fullscreen>
291
+ <div *ngFor="let event of events.slice().reverse()" style="padding:10px">
292
+ <div>
293
+ <p><strong>{{event.name}}</strong></p>
294
+ <small><pre><code>{{event.json}}</code></pre></small>
295
+ <ion-item-divider></ion-item-divider>
296
+ </div>
297
+ </div>
298
+ </ion-content>
299
+ `,
300
+ styles: []
301
+ })
302
+
303
+ export class HelloWorldPage implements OnDestroy {
304
+ ready:boolean = false;
305
+ enabled:boolean = false;
306
+ events:any = [];
307
+ subscriptions:Subscription[] = [];
308
+
309
+ constructor(private zone:NgZone) {}
310
+
311
+ /// WARNING: DO NOT Use ionViewWillEnter to configure the SDK -- use ngAfterContentInit.
312
+ /// ionViewWillEnter only executes when the app is brought to the foreground.
313
+ /// It will NOT execute when the app is launched in the background, as the SDK will often do.
314
+ ///
315
+ ngAfterContentInit() {
316
+ /// Step 1: Subscribe to BackgroundGeolocation events.
317
+ this.subscriptions.push(BackgroundGeolocation.onLocation((location) => {
318
+ this.addEvent('onLocation', location);
319
+ }))
320
+
321
+ this.subscriptions.push(BackgroundGeolocation.onMotionChange((event) => {
322
+ this.addEvent('onMotionChange', event);
323
+ }))
324
+
325
+ this.subscriptions.push(BackgroundGeolocation.onActivityChange((event) => {
326
+ this.addEvent('onActivityChange', event);
327
+ }))
328
+
329
+ this.subscriptions.push(BackgroundGeolocation.onProviderChange((event) => {
330
+ this.addEvent('onProviderChange', event);
331
+ }))
332
+
333
+ /// Step 2: Ready the plugin.
154
334
  BackgroundGeolocation.ready({
155
335
  // Geolocation Config
156
336
  desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
157
337
  distanceFilter: 10,
158
338
  // Activity Recognition
159
- stopTimeout: 1,
339
+ stopTimeout: 5,
160
340
  // Application config
161
341
  debug: true, // <-- enable this hear sounds for background-geolocation life-cycle.
162
342
  logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
163
343
  stopOnTerminate: false, // <-- Allow the background-service to continue tracking when user closes the app.
164
344
  startOnBoot: true, // <-- Auto start tracking when device is powered-up.
165
- // HTTP / SQLite config
166
- url: 'http://yourserver.com/locations',
167
- batchSync: false, // <-- [Default: false] Set true to sync locations to server in a single HTTP request.
168
- autoSync: true, // <-- [Default: true] Set true to sync each location to server as it arrives.
169
- headers: { // <-- Optional HTTP headers
170
- "X-FOO": "bar"
171
- },
172
- params: { // <-- Optional HTTP params append to each HTTP request
173
- "auth_token": "maybe_your_server_authenticates_via_token_YES?"
174
- },
175
- extras: { // <-- Optional meta-data appended to each recorded location.
176
- "foo": "bar"
177
- }
178
345
  }).then((state) => {
179
- console.log("BackgroundGeolocation is configured and ready to use ", state.enabled);
180
-
181
- if (!state.enabled) {
182
- ////
183
- // 3. Start tracking!
184
- //
185
- BackgroundGeolocation.start().then(() => {
186
- console.log("[start] success");
187
- });
188
- }
189
- }).catch((error) => {
190
- console.warn('[BackgroundGeolocation ready] ERROR: ', error);
346
+ // BackgroundGeolocation is now ready to use.
347
+ this.ready = true;
348
+ this.enabled = state.enabled;
349
+ this.addEvent('State', state);
191
350
  });
192
351
  }
193
- }
194
352
 
353
+ /// When view is destroyed, be sure to .remove() all BackgroundGeolocation
354
+ /// event-subscriptions.
355
+ ngOnDestroy() {
356
+ this.subscriptions.forEach((subscription:Subscription) => {
357
+ subscription.remove();
358
+ })
359
+ }
360
+
361
+ /// Add an event to the view.
362
+ addEvent(name:string, event:any) {
363
+ this.zone.run(() => {
364
+ this.events.push({
365
+ name: name,
366
+ json: JSON.stringify(event, null, 2)
367
+ })
368
+ })
369
+ }
370
+
371
+ /// Toggle the plugin on/off.
372
+ onToggleEnabled() {
373
+ if (!this.ready) { return }
374
+
375
+ this.events = [];
376
+ if (this.enabled) {
377
+ BackgroundGeolocation.start().then((state) => {
378
+ this.addEvent('State', state);
379
+ })
380
+ } else {
381
+ BackgroundGeolocation.stop().then((state) => {
382
+ this.addEvent('State', state);
383
+ })
384
+ }
385
+ }
386
+ }
195
387
  ```
196
388
 
197
- :warning: Do not execute *any* API method which will require accessing location-services until the callback to **`#ready`** executes (eg: `#getCurrentPosition`, `#watchPosition`, `#start`).
389
+ </details>
390
+
391
+ ---------------------------------------------------------------------------------------------
198
392
 
199
393
  ### Promise API
200
394
 
@@ -0,0 +1 @@
1
+ c16850b24271032c3ccb10349ba0774069a67819
@@ -0,0 +1 @@
1
+ e18fc8dd9d37cd2ee00c64e8e1a78ebc0839cf8515cf52463cfdd0761aa580f9
@@ -0,0 +1 @@
1
+ 566d4327d7b1b9ab3b271dc61d6d661ac1f4c8c89557de1d11c52928a4af5682c702a315e76f2cf46dc882d405fe3c4d6a958c7f0a885a228b3d0b2a735d8305
@@ -4,6 +4,6 @@
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
  <groupId>com.transistorsoft</groupId>
6
6
  <artifactId>tslocationmanager</artifactId>
7
- <version>3.1.34</version>
7
+ <version>3.1.35</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -0,0 +1 @@
1
+ a558cd1eb103134e207932ea7af8c6cf48cc97d7
@@ -0,0 +1 @@
1
+ f11bf76c75d7d586ceef2978d3bb789deceee30b6c06032edf57647333f98efe
@@ -0,0 +1 @@
1
+ d7d2120c48292dc74e273daacad40b19ebfa0617aed7f8fa3b9a8eeb4a10b0ab85e2cc702394f9d1aaf0619b3fdcef728db223c76ffca66288033eb867787acb
@@ -3,13 +3,11 @@
3
3
  <groupId>com.transistorsoft</groupId>
4
4
  <artifactId>tslocationmanager</artifactId>
5
5
  <versioning>
6
- <latest>3.1.34</latest>
7
- <release>3.1.34</release>
6
+ <latest>3.1.35</latest>
7
+ <release>3.1.35</release>
8
8
  <versions>
9
- <version>3.1.32</version>
10
- <version>3.1.33</version>
11
- <version>3.1.34</version>
9
+ <version>3.1.35</version>
12
10
  </versions>
13
- <lastUpdated>20211013180057</lastUpdated>
11
+ <lastUpdated>20211124132853</lastUpdated>
14
12
  </versioning>
15
13
  </metadata>
@@ -0,0 +1 @@
1
+ 11d78cd48003bc32dc68a1fa87198884c1ca18ed9780167ec1598464c3466ea9
@@ -0,0 +1 @@
1
+ 0027097d529ca8a970aa003eed2bf32ebcb45d662d40b3f99d1ec4ccc37067ea4393737ed169ffaa7c8b7709ac1d934cf1d316eaa01acbe662eb86f414bae3db
@@ -4,6 +4,6 @@
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
  <groupId>com.transistorsoft</groupId>
6
6
  <artifactId>tslocationmanager-reverse</artifactId>
7
- <version>3.1.34</version>
7
+ <version>3.1.35</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -0,0 +1 @@
1
+ 5ee1b9a1bf97d7ea8e005f108f18ec78e2410dfdc45a6e29755a28e5df15daf1
@@ -0,0 +1 @@
1
+ db1bf3fe2779d75145bcf1929692b5a87e24f9d4046d783a40d903eb7ef0a780f26062c03be017b2a9bb759778b9969eebda9b952abde90ac9e0dd37912d728f
@@ -3,13 +3,11 @@
3
3
  <groupId>com.transistorsoft</groupId>
4
4
  <artifactId>tslocationmanager-reverse</artifactId>
5
5
  <versioning>
6
- <latest>3.1.34</latest>
7
- <release>3.1.34</release>
6
+ <latest>3.1.35</latest>
7
+ <release>3.1.35</release>
8
8
  <versions>
9
- <version>3.1.32</version>
10
- <version>3.1.33</version>
11
- <version>3.1.34</version>
9
+ <version>3.1.35</version>
12
10
  </versions>
13
- <lastUpdated>20211013180057</lastUpdated>
11
+ <lastUpdated>20211124132853</lastUpdated>
14
12
  </versioning>
15
13
  </metadata>
@@ -226,7 +226,12 @@ public class BackgroundGeolocationPlugin extends Plugin {
226
226
  @PluginMethod()
227
227
  public void stopSchedule(PluginCall call) {
228
228
  getAdapter().stopSchedule();
229
- call.resolve();
229
+ TSConfig config = TSConfig.getInstance(getContext());
230
+ try {
231
+ call.resolve(JSObject.fromJSONObject(config.toJson()));
232
+ } catch (JSONException e) {
233
+ call.reject(e.getMessage());
234
+ }
230
235
  }
231
236
 
232
237
  private class StartGeofencesCallback implements TSCallback {
@@ -6,34 +6,34 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64_i386_x86_64-simulator</string>
9
+ <string>ios-arm64_x86_64-maccatalyst</string>
10
10
  <key>LibraryPath</key>
11
11
  <string>TSLocationManager.framework</string>
12
12
  <key>SupportedArchitectures</key>
13
13
  <array>
14
14
  <string>arm64</string>
15
- <string>i386</string>
16
15
  <string>x86_64</string>
17
16
  </array>
18
17
  <key>SupportedPlatform</key>
19
18
  <string>ios</string>
20
19
  <key>SupportedPlatformVariant</key>
21
- <string>simulator</string>
20
+ <string>maccatalyst</string>
22
21
  </dict>
23
22
  <dict>
24
23
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_x86_64-maccatalyst</string>
24
+ <string>ios-arm64_i386_x86_64-simulator</string>
26
25
  <key>LibraryPath</key>
27
26
  <string>TSLocationManager.framework</string>
28
27
  <key>SupportedArchitectures</key>
29
28
  <array>
30
29
  <string>arm64</string>
30
+ <string>i386</string>
31
31
  <string>x86_64</string>
32
32
  </array>
33
33
  <key>SupportedPlatform</key>
34
34
  <string>ios</string>
35
35
  <key>SupportedPlatformVariant</key>
36
- <string>maccatalyst</string>
36
+ <string>simulator</string>
37
37
  </dict>
38
38
  <dict>
39
39
  <key>LibraryIdentifier</key>
@@ -138,7 +138,7 @@
138
138
  </data>
139
139
  <key>Info.plist</key>
140
140
  <data>
141
- ToAPY8WGR8t6d1sQIC7NLtNySNs=
141
+ Wmf3yVcUbx+t9XH4ju46ia3KxCE=
142
142
  </data>
143
143
  <key>Modules/module.modulemap</key>
144
144
  <data>
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>20G224</string>
6
+ <string>21A559</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -17,29 +17,29 @@
17
17
  <key>CFBundlePackageType</key>
18
18
  <string>FMWK</string>
19
19
  <key>CFBundleShortVersionString</key>
20
- <string>4.0.7</string>
20
+ <string>4.1.0</string>
21
21
  <key>CFBundleSupportedPlatforms</key>
22
22
  <array>
23
23
  <string>MacOSX</string>
24
24
  </array>
25
25
  <key>CFBundleVersion</key>
26
- <string>381</string>
26
+ <string>382</string>
27
27
  <key>DTCompiler</key>
28
28
  <string>com.apple.compilers.llvm.clang.1_0</string>
29
29
  <key>DTPlatformBuild</key>
30
- <string>12D4e</string>
30
+ <string>13A1030d</string>
31
31
  <key>DTPlatformName</key>
32
32
  <string>macosx</string>
33
33
  <key>DTPlatformVersion</key>
34
- <string>11.1</string>
34
+ <string>12.0</string>
35
35
  <key>DTSDKBuild</key>
36
- <string>20C63</string>
36
+ <string>21A344</string>
37
37
  <key>DTSDKName</key>
38
- <string>macosx11.1</string>
38
+ <string>macosx12.0</string>
39
39
  <key>DTXcode</key>
40
- <string>1240</string>
40
+ <string>1310</string>
41
41
  <key>DTXcodeBuild</key>
42
- <string>12D4e</string>
42
+ <string>13A1030d</string>
43
43
  <key>LSMinimumSystemVersion</key>
44
44
  <string>10.15</string>
45
45
  <key>UIDeviceFamily</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transistorsoft/capacitor-background-geolocation",
3
- "version": "4.4.2",
3
+ "version": "4.4.3",
4
4
  "description": "The most sophisticated cross platform Capacitor background location tracking & geofencing module with battery-conscious motion-detection intelligence",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/index.js",
package/CHANGELOG.md DELETED
@@ -1,81 +0,0 @@
1
- # Change Log
2
-
3
- ## 4.4.2 &mdash; 2021-11-05
4
- * [Fixed][iOS] Minor fix to iOS reset:false behaviour. When .ready() was called a 2nd time, the plugin would apply the config anyway, bypassing reset:false.
5
-
6
- ## 4.4.1 &mdash; 2021-11-03
7
- * [Changed][Android] Minnor change to Move Android plugin's registration of event-listeners into the .ready method instead of Capacitor plugin init stage.
8
-
9
- ## 4.4.0 &mdash; 2021-10-29
10
- * [Added] New `Authorization.strategy "SAS"` (alternative to default `JWT`).
11
- * [Changed] **Deprecated** `BackgroundGeolocation.removeListener`. All event-handlers now return a `Subscription` instance containing a `.remove()` method. You will keep track of your own `subscription` instances and call `.remove()` upon them when you wish to remove an event listener. Eg:
12
-
13
- ```javascript
14
- /// OLD
15
- const onLocation = (location) => {
16
- console.log('[onLocation');
17
- }
18
- BackgroundGeolocation.onLocation(onLocation);
19
- ...
20
- // deprecated: removeListener
21
- BackgroundGeolocation.removeListener('location', onLocation);
22
-
23
- /// NEW: capture returned subscription instance.
24
- const onLocationSubscription = BackgroundGeolocation.onLocation(onLocation);
25
- ...
26
- // Removing an event-listener.
27
- onLocationSubscription.remove();
28
- ```
29
-
30
- ## 4.3.0 &mdash; 2021-09-13
31
-
32
- * [Added][Android] Implement new Android 12 "reduced accuracy" mechanism `requestTemporaryFullAccuracy`.
33
- * [Fixed][iOS] `Authorization.refreshPayload refreshToken` was not performing a String replace on the `{refreshToken}` template, instead over-writing the entire string. Eg: if provided with `'refresh_token': 'Bearer {refreshToken}`, `Bearer ` would be over-written and replaced with only the refresh-token.
34
- * [Fixed][Android] Fixed crash reported by Huawei device, where verticalAccuracy returns NaN.
35
- * [Added] Null-check identifier !== null in getGeofence, hasGeofence, removeGeofence
36
-
37
- ## [4.2.2] &mdash; 2021-08-23
38
- * [Fixed][iOS] add config change listeners for `heartbeatInterval` and `preventSuspend` to dynamically update interval when changed with `setConfig`.
39
- * [Fixed] Method `stopSchedule` was not implemented.
40
- * [Fixed] Method `getGeofence` was not implemented.
41
-
42
- ## [4.2.1] &mdash; 2021-08-03
43
- * [Changed][Android] Revert default `okHttpVersion` back to `3.12.13`. `4.x` requires `minSdkVersion 21` (*Android 5*).
44
-
45
- ## [4.2.0] &mdash; 2021-08-02
46
- * [Changed][Android] Update Android default `okhttp` version to `4.9.1`.
47
- * [Changed][Android] Update Android `eventbus` to `3.2.0`.
48
- * [Changed][Android] Update Android `android-permissions` to import from *MavenCentral* instead of deprecated `jCenter`.
49
- * [Changed][iOS] Re-compile iOS `TSLocationManager` using XCode 12.4 instead of `12.5.1`.
50
- * [Fixed][Android] Fix an edge-case requesting motion permission. If `getCurrentPosition()` is executed before `.start()`, the Android SDK fails to request motion permission.
51
-
52
- ## [0.0.13] &mdash; 2021-06-11
53
- * [Fixed][iOS] Reports 2 reports of iOS crash `NSInvalidArgumentException (TSLocation.m line 178)` with iOS 14
54
- .x. Wrap JSON serialization in @try/@catch block. iOS JSON serialization docs state the supplied NSError err
55
- or ref should report problems but it seems this is only "sometimes" now.
56
-
57
- ## [0.0.12] &mdash; 2021-06-08
58
- - [Fixed] Implement `watchPosition`
59
-
60
- ## [0.0.11] &mdash; 2021-06-07
61
- - [Fixed] iOS. Small change to TSLocationManager to ignore onResume events when .ready() not yet called. This was causing the plugin to start itself before ready is called. Could result in missed events.
62
-
63
- ## [0.0.10] &mdash; 2021-06-06
64
- - Fixed iOS .podspec. Was still referencing TSBackgroundFetch.xcframework, which was removed from this repo now that capacitor-background-fetch exitsts.
65
-
66
- ## [0.0.9] &mdash; 2021-06-03
67
- - Add `EVENT_` constants to `BackgroundGeolocation` class, eg: `BackgroundGeolocation.EVENT_LOCATION`.
68
- - Fix Android example. Was not configuring background-fetch
69
-
70
- ## [0.0.8] &mdash; 2021-06-02
71
- - Update Setup Instructions for `@transistorsoft/capacitor-background-fetch`.
72
-
73
- ## [0.0.4] &mdash; 2021-06-02
74
- - Fix package.json to include ios/TSLocationManager.xcframework, android/libs when publishing to npm.
75
-
76
- ## [0.0.3] &mdash; 2021-05-31
77
- - Fix Podfile name in package.json
78
-
79
- ## [0.0.2] &mdash; 2021-05-31
80
- - Working beta version for both iOS / Android.
81
-
@@ -1 +0,0 @@
1
- 738f4f927fde78332eeeb300ca1ac2ffbe6ddc26
@@ -1 +0,0 @@
1
- a3dd1567edc75edbf1feb8bc3682d5e02ded8605e49854ba3169f391bfc8d09f
@@ -1 +0,0 @@
1
- 8d405b0427fd37b225dd4ca90633614371c994f4e1fa2ada7c453a067c08ebc9f7b41b1ebfe13f09bafacfa948385b3a27b6964e3936ecb4e822c184603afe58
@@ -1 +0,0 @@
1
- 008bd7362c4446af36bef9e156b6c702a7e3b781
@@ -1 +0,0 @@
1
- 5dc8c142d50c9e6c9986a1b3d374e9ed86427da743e4030d24c45c9c0c4c2fdf
@@ -1 +0,0 @@
1
- d8d251199fbd1fa61abcb4bf82b4e67624d82fc03fb34d114b10d99bcf4e5d443f65e38e16620a0020c566d844a51e600f4f5aa073c754a4ac2824210ba30498
@@ -1 +0,0 @@
1
- 649f4c006732c5b2a04b6f90fba952377fa7281dda7374a20f5c67661439b45f
@@ -1 +0,0 @@
1
- cfa5f14f859d2bd881867cc63b1968a7527b5a7e8082b551d3e3ad854783fcadefd9f2e21f2071201e1570347348cf4355e5d74c2049a1af4f21c1cca8c208f7
@@ -1 +0,0 @@
1
- e6ebe3816a4c6ddb141b433b631e4e00c67adec24e46e45d0f06279cc0677e4f
@@ -1 +0,0 @@
1
- f4c9c0482e0b822dcca71dcc32eaa5ee3a0caa93e0936e13e1ae38fb53f0b3137125b7cd90ff0469e53bb88caf961955972dc86a442dc2d937ae826a156df7f1