@transistorsoft/capacitor-background-geolocation 4.3.0 → 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 (61) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +256 -87
  3. package/android/libs/com/transistorsoft/tslocationmanager/{3.1.33/tslocationmanager-3.1.33.aar → 3.1.35/tslocationmanager-3.1.35.aar} +0 -0
  4. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.aar.md5 +1 -0
  5. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.aar.sha1 +1 -0
  6. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.aar.sha256 +1 -0
  7. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.aar.sha512 +1 -0
  8. package/android/libs/com/transistorsoft/tslocationmanager/{3.1.33/tslocationmanager-3.1.33.pom → 3.1.35/tslocationmanager-3.1.35.pom} +1 -1
  9. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.pom.md5 +1 -0
  10. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.pom.sha1 +1 -0
  11. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.pom.sha256 +1 -0
  12. package/android/libs/com/transistorsoft/tslocationmanager/3.1.35/tslocationmanager-3.1.35.pom.sha512 +1 -0
  13. package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +4 -5
  14. package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.1.33/tslocationmanager-reverse-3.1.33.aar → 3.1.35/tslocationmanager-reverse-3.1.35.aar} +0 -0
  15. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.aar.md5 +1 -0
  16. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.aar.sha1 +1 -0
  17. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.aar.sha256 +1 -0
  18. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.aar.sha512 +1 -0
  19. package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.1.33/tslocationmanager-reverse-3.1.33.pom → 3.1.35/tslocationmanager-reverse-3.1.35.pom} +1 -1
  20. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.pom.md5 +1 -0
  21. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.pom.sha1 +1 -0
  22. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.pom.sha256 +1 -0
  23. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.35/tslocationmanager-reverse-3.1.35.pom.sha512 +1 -0
  24. package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +4 -5
  25. package/android/src/main/java/com/transistorsoft/bggeo/capacitor/BackgroundGeolocationPlugin.java +7 -3
  26. package/dist/declarations/BackgroundGeolocation.d.ts +52 -32
  27. package/dist/declarations/Subscription.d.ts +104 -0
  28. package/dist/declarations/interfaces/Subscription.d.ts +104 -0
  29. package/dist/index.js +65 -44
  30. package/dist/index.js.map +1 -1
  31. package/dist/plugin.cjs.js +65 -44
  32. package/dist/plugin.cjs.js.map +1 -1
  33. package/ios/Plugin/BackgroundGeolocationModule.m +8 -6
  34. package/ios/TSLocationManager.xcframework/Info.plist +9 -9
  35. package/ios/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Info.plist +0 -0
  36. package/ios/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/TSLocationManager +0 -0
  37. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Info.plist +0 -0
  38. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/TSLocationManager +0 -0
  39. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
  40. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
  41. package/ios/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeResources +1 -1
  42. package/ios/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Info.plist +9 -9
  43. package/ios/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/TSLocationManager +0 -0
  44. package/package.json +1 -1
  45. package/CHANGELOG.md +0 -54
  46. package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.md5 +0 -1
  47. package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha1 +0 -1
  48. package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha256 +0 -1
  49. package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha512 +0 -1
  50. package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.md5 +0 -1
  51. package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha1 +0 -1
  52. package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha256 +0 -1
  53. package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha512 +0 -1
  54. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.md5 +0 -1
  55. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha1 +0 -1
  56. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha256 +0 -1
  57. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha512 +0 -1
  58. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.md5 +0 -1
  59. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha1 +0 -1
  60. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha256 +0 -1
  61. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha512 +0 -1
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Chris Scott
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
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
 
@@ -203,7 +397,7 @@ The `BackgroundGeolocation` Javascript API supports [Promises](https://developer
203
397
 
204
398
  ## :large_blue_diamond: [Demo Application](./example)
205
399
 
206
- A fully-featured [Demo App](./example) is available in this repo. After first cloning this repo, follow the installation instructions in the [README](./example/README.md) there. This demo-app includes an advanced settings-screen allowing you to quickly experiment with all the different settings available for each platform.
400
+ A fully-featured [Demo App](./example) is available in this repo, for both *React* and *Angular*. After first cloning this repo, follow the installation instructions in the [README](./example/README.md) there. This demo-app includes an advanced settings-screen allowing you to quickly experiment with all the different settings available for each platform.
207
401
 
208
402
  ![Home](https://dl.dropboxusercontent.com/s/wa43w1n3xhkjn0i/home-framed-350.png?dl=1)
209
403
  ![Settings](https://dl.dropboxusercontent.com/s/8oad228siog49kt/settings-framed-350.png?dl=1)
@@ -217,28 +411,3 @@ A simple Node-based [web-application](https://github.com/transistorsoft/backgrou
217
411
 
218
412
  ![](https://dl.dropboxusercontent.com/s/tiy5b2oivt0np2y/background-geolocation-console-grid.png?dl=1)
219
413
 
220
- # License
221
-
222
- The MIT License (MIT)
223
-
224
- Copyright (c) 2018 Chris Scott, Transistor Software
225
-
226
- Permission is hereby granted, free of charge, to any person obtaining a copy
227
- of this software and associated documentation files (the "Software"), to deal
228
- in the Software without restriction, including without limitation the rights
229
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
230
- copies of the Software, and to permit persons to whom the Software is
231
- furnished to do so, subject to the following conditions:
232
-
233
- The above copyright notice and this permission notice shall be included in all
234
- copies or substantial portions of the Software.
235
-
236
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
237
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
238
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
239
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
240
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
241
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
242
- SOFTWARE.
243
-
244
-
@@ -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.33</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,12 +3,11 @@
3
3
  <groupId>com.transistorsoft</groupId>
4
4
  <artifactId>tslocationmanager</artifactId>
5
5
  <versioning>
6
- <latest>3.1.33</latest>
7
- <release>3.1.33</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>
9
+ <version>3.1.35</version>
11
10
  </versions>
12
- <lastUpdated>20210914133755</lastUpdated>
11
+ <lastUpdated>20211124132853</lastUpdated>
13
12
  </versioning>
14
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.33</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,12 +3,11 @@
3
3
  <groupId>com.transistorsoft</groupId>
4
4
  <artifactId>tslocationmanager-reverse</artifactId>
5
5
  <versioning>
6
- <latest>3.1.33</latest>
7
- <release>3.1.33</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>
9
+ <version>3.1.35</version>
11
10
  </versions>
12
- <lastUpdated>20210914133755</lastUpdated>
11
+ <lastUpdated>20211124132853</lastUpdated>
13
12
  </versioning>
14
13
  </metadata>
@@ -96,7 +96,6 @@ public class BackgroundGeolocationPlugin extends Plugin {
96
96
  if (activity != null) {
97
97
  bgGeo.setActivity(activity);
98
98
  }
99
- registerEventListeners();
100
99
  }
101
100
 
102
101
  private void handlePlayServicesConnectError(Integer errorCode) {
@@ -132,7 +131,7 @@ public class BackgroundGeolocationPlugin extends Plugin {
132
131
  return;
133
132
  }
134
133
  mReady = true;
135
-
134
+ registerEventListeners();
136
135
  BackgroundGeolocation adapter = BackgroundGeolocation.getInstance(getContext());
137
136
 
138
137
  if (config.isFirstBoot()) {
@@ -227,7 +226,12 @@ public class BackgroundGeolocationPlugin extends Plugin {
227
226
  @PluginMethod()
228
227
  public void stopSchedule(PluginCall call) {
229
228
  getAdapter().stopSchedule();
230
- 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
+ }
231
235
  }
232
236
 
233
237
  private class StartGeofencesCallback implements TSCallback {