@transistorsoft/capacitor-background-geolocation 4.9.4 → 4.9.5
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 +2 -2
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar.md5 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar.sha1 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar.sha256 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.10/tslocationmanager-3.2.10.aar.sha512 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar.md5 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar.sha1 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar.sha256 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.10/tslocationmanager-reverse-3.2.10.aar.sha512 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +1 -1
- 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/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,51 +0,0 @@
|
|
|
1
|
-
/// <reference path="./Config.d.ts" />
|
|
2
|
-
|
|
3
|
-
declare module "@transistorsoft/capacitor-background-geolocation" {
|
|
4
|
-
/**
|
|
5
|
-
* This `State` object contains all the provided [[Config]] options in addition to:
|
|
6
|
-
* - [[enabled]].
|
|
7
|
-
* - [[schedulerEnabled]].
|
|
8
|
-
* - [[trackingMode]].
|
|
9
|
-
* - [[odometer]].
|
|
10
|
-
* - [[didLaunchInBackground]].
|
|
11
|
-
* - [[didDeviceReboot]]
|
|
12
|
-
*/
|
|
13
|
-
interface State extends Config {
|
|
14
|
-
/**
|
|
15
|
-
* `true` when the SDK has been enabled via methods [[start]] or [[startGeofences]]. When `false`, the
|
|
16
|
-
* SDK is completely __OFF__. No tracking of any kind will occur. The SDK will consume no energy.
|
|
17
|
-
*/
|
|
18
|
-
enabled: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* `true` when the SDK is currently configured with a [[schedule]] and [[startSchedule]] has been executed.
|
|
21
|
-
* [[stopSchedule]] will set this to `false`.
|
|
22
|
-
*/
|
|
23
|
-
schedulerEnabled: boolean;
|
|
24
|
-
/**
|
|
25
|
-
| Value | Description |
|
|
26
|
-
|------------|-----------------------------------|
|
|
27
|
-
| __`0`__ | Monitoring geofences only |
|
|
28
|
-
| __`1`__ | Monitoring location + geofences |
|
|
29
|
-
*/
|
|
30
|
-
trackingMode: TrackingMode;
|
|
31
|
-
/**
|
|
32
|
-
* The current distance-traveled.
|
|
33
|
-
* ### ℹ️ See also:
|
|
34
|
-
* - [[resetOdometer]], [[setOdometer]]
|
|
35
|
-
* - [[getOdometer]]
|
|
36
|
-
*/
|
|
37
|
-
odometer: number;
|
|
38
|
-
/**
|
|
39
|
-
* `true` when the iOS app was launched in the background. Always `false` for Android.
|
|
40
|
-
* iOS apps can be launched in the background due to a background-fetch event, geofence events or exiting the [[Config.stationaryRadius]].
|
|
41
|
-
*
|
|
42
|
-
* One might use this flag to choose to load only minimal resources until the iOS app is determined to have launched into the foreground.
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
didLaunchInBackground: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Indicates if the app was launched after the device was rebooted.
|
|
48
|
-
*/
|
|
49
|
-
didDeviceReboot: boolean;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
declare module "@transistorsoft/capacitor-background-geolocation" {
|
|
2
|
-
/**
|
|
3
|
-
* Object returned by BackgroundGeolocation event-listeners. `Subscription` contains just a single method [[remove]], used for removing an event-listener.
|
|
4
|
-
*
|
|
5
|
-
* - [[BackgroundGeolocation.onLocation]]
|
|
6
|
-
* - [[BackgroundGeolocation.onMotionChange]]
|
|
7
|
-
* - [[BackgroundGeolocation.onHttp]]
|
|
8
|
-
* - [[BackgroundGeolocation.onHeartbeat]]
|
|
9
|
-
* - [[BackgroundGeolocation.onProviderChange]]
|
|
10
|
-
* - [[BackgroundGeolocation.onActivityChange]]
|
|
11
|
-
* - [[BackgroundGeolocation.onGeofence]]
|
|
12
|
-
* - [[BackgroundGeolocation.onGeofencesChange]]
|
|
13
|
-
* - [[BackgroundGeolocation.onEnabledChange]]
|
|
14
|
-
* - [[BackgroundGeolocation.onConnectivityChange]]
|
|
15
|
-
* - [[BackgroundGeolocation.onSchedule]]
|
|
16
|
-
* - [[BackgroundGeolocation.onPowerSaveChange]]
|
|
17
|
-
* - [[BackgroundGeolocation.onNotificationAction]]
|
|
18
|
-
* - [[BackgroundGeolocation.onAuthorization]]
|
|
19
|
-
*
|
|
20
|
-
* In the past, one would remove event-listeners using the __now-deprectated__ [[BackgroundGeolocation.removeListener]].
|
|
21
|
-
*
|
|
22
|
-
* ## Removing an event-listener:
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```typescript
|
|
26
|
-
* // Event-listeners return a Subscription instance, containing a .remove() method.
|
|
27
|
-
* const subscription = BackgroundGeolocation.onLocation(location => {
|
|
28
|
-
* console.log("[onLocation] ", location);
|
|
29
|
-
* });
|
|
30
|
-
* .
|
|
31
|
-
* .
|
|
32
|
-
* .
|
|
33
|
-
* // Later, to remove the event-listener:
|
|
34
|
-
* subscription.remove();
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* One might typically manage a collection of `Subscription` instances
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```typescript
|
|
41
|
-
* import BackgroundGeolocation, {
|
|
42
|
-
* Location,
|
|
43
|
-
* Subscription
|
|
44
|
-
* } from ...
|
|
45
|
-
*
|
|
46
|
-
* // Your custom Collection of Subscription instances.
|
|
47
|
-
* const SUBSCRIPTIONS = [];
|
|
48
|
-
*
|
|
49
|
-
* // Your custom method to push a Subscription instance.
|
|
50
|
-
* const subscribe = (subscription:Subscription) => {
|
|
51
|
-
* SUBSCRIPTIONS.push(subscription);
|
|
52
|
-
* }
|
|
53
|
-
*
|
|
54
|
-
* // Your custom method to interate your SUBSCRIPTIONS and .remove each.
|
|
55
|
-
* const unsubscribe = () => {
|
|
56
|
-
* SUBSCRIPTIONS.forEach((subscription:Subscription) => subscription.remove());
|
|
57
|
-
* }
|
|
58
|
-
*
|
|
59
|
-
* const initBackgroundGeolocation = () {
|
|
60
|
-
* // Create event-listeners as usual, feeding the returned Subscription into
|
|
61
|
-
* // your custom subscribe() method.
|
|
62
|
-
* subscribe(BackgroundGeolocation.onLocation((location:Location) => {
|
|
63
|
-
* console.log('[onLocation]', location);
|
|
64
|
-
* });
|
|
65
|
-
*
|
|
66
|
-
* subscribe(BackgroundGeolocation.onMotionChange((location:Location) => {
|
|
67
|
-
* console.log('[onMotionChange]', location);
|
|
68
|
-
* });
|
|
69
|
-
*
|
|
70
|
-
* subscribe(BackgroundGeolocation.onEnabledChange((enabled:boolean) => {
|
|
71
|
-
* console.log('[onEnabledChange]', enabled);
|
|
72
|
-
* });
|
|
73
|
-
* }
|
|
74
|
-
*
|
|
75
|
-
* const onDestroyView = () => {
|
|
76
|
-
* // Call your custom unsubscribe method
|
|
77
|
-
* unsubscribe();
|
|
78
|
-
* }
|
|
79
|
-
*
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
interface Subscription {
|
|
83
|
-
/**
|
|
84
|
-
* Removes a `BackgroundGeolocation` event-listener.
|
|
85
|
-
* @example
|
|
86
|
-
* ```typescript
|
|
87
|
-
* // Event-listeners return a Subscription instance, containing a .remove() method.
|
|
88
|
-
* const onLocationSubscription = BackgroundGeolocation.onLocation(location => {
|
|
89
|
-
* console.log("[onLocation] ", location);
|
|
90
|
-
* });
|
|
91
|
-
*
|
|
92
|
-
* const onGeofenceSubscription = BackgroundGeolocation.onGeofence(event => {
|
|
93
|
-
* console.log("[onGeofence] ", event);
|
|
94
|
-
* });
|
|
95
|
-
* .
|
|
96
|
-
* .
|
|
97
|
-
* .
|
|
98
|
-
* // Later, removing event-listeners.
|
|
99
|
-
* onLocationSubscription.remove();
|
|
100
|
-
* onGeofenceSubscription.remove();
|
|
101
|
-
*/
|
|
102
|
-
remove():void;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
declare module "@transistorsoft/capacitor-background-geolocation" {
|
|
2
|
-
/**
|
|
3
|
-
* Response object returned by [[BackgroundGeolocation.findOrCreateTransistorAuthorizationToken]] for configuring the SDK's [[Authorization]] with Transistor Software's Demo Server at [http://tracker.transistorsoft.com](http://tracker.transistorsoft.com).
|
|
4
|
-
*
|
|
5
|
-
* You may also run your own instance of Demo Server locally. See [background-geolocation-console](https://github.com/transistorsoft/background-geolocation-console)
|
|
6
|
-
*
|
|
7
|
-
* The test server is a great way to debug location problems or evalute the SDK's behaviour, since the results can easily be shared with *Transistor Software* when requesting support.
|
|
8
|
-
*
|
|
9
|
-
* 
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* // Url to demo server.
|
|
15
|
-
* let url = "http://tracker.transistorsoft.com";
|
|
16
|
-
* let orgname = "my-company-name";
|
|
17
|
-
* let username = "my-username";
|
|
18
|
-
*
|
|
19
|
-
* // Fetch an authoriztion token from server. The SDK will cache the received token.
|
|
20
|
-
* let token = await
|
|
21
|
-
* BackgroundGeolocation.findOrCreateTransistorAuthorizationToken(orgname, username, url);
|
|
22
|
-
*
|
|
23
|
-
* BackgroundGeolocation.ready({
|
|
24
|
-
* transistorAuthorizationToken: token
|
|
25
|
-
* })
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* ## Viewing Your Tracking Results
|
|
29
|
-
*
|
|
30
|
-
* To *view* your tracking results in the browser, use your configured "Organization Name" and visit:
|
|
31
|
-
*
|
|
32
|
-
* http://tracker.transistorsoft.com/my-organization-name
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
interface TransistorAuthorizationToken {
|
|
36
|
-
/**
|
|
37
|
-
* The authorization token to provide to [[Authorization.accessToken]]
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```typescript
|
|
41
|
-
* BackgroundGeolocation.ready({
|
|
42
|
-
* authorization: {
|
|
43
|
-
* accessToken:
|
|
44
|
-
* }
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
accessToken:string;
|
|
49
|
-
/**
|
|
50
|
-
* The token used to request to provide to [[Authorization.refreshToken]]
|
|
51
|
-
*/
|
|
52
|
-
refreshToken:string;
|
|
53
|
-
/**
|
|
54
|
-
* The expiry time of the [[Authorization.accessToken]]
|
|
55
|
-
*/
|
|
56
|
-
expires:number;
|
|
57
|
-
/**
|
|
58
|
-
* The url to the Transistor Demo server where this token came from.
|
|
59
|
-
* __Read only__
|
|
60
|
-
*/
|
|
61
|
-
url?: string;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
declare module "@transistorsoft/capacitor-background-geolocation" {
|
|
2
|
-
/**
|
|
3
|
-
* Options provided to [[BackgroundGeolocation.watchPosition]].
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* BackgroundGeolocation.watchPosition((location) => {
|
|
8
|
-
* console.log("[watchPosition] -", location);
|
|
9
|
-
* }, (errorCode) => {
|
|
10
|
-
* console.log("[watchPosition] ERROR -", errorCode);
|
|
11
|
-
* }, {
|
|
12
|
-
* interval: 1000,
|
|
13
|
-
* desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
|
|
14
|
-
* persist: true,
|
|
15
|
-
* extras: {foo: "bar"},
|
|
16
|
-
* timeout: 60000
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
interface WatchPositionRequest {
|
|
21
|
-
/**
|
|
22
|
-
* Location update interval in `milliseconds`. Defaults to `1000`.
|
|
23
|
-
*/
|
|
24
|
-
interval?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Specifies the accuracy required. See [[Config.desiredAccuracy]]. Only [[BackgroundGeolocation.DESIRED_ACCURACY_HIGH]] uses GPS.
|
|
27
|
-
* Defaults to [[DESIRED_ACCURACY_HIGH]].
|
|
28
|
-
*/
|
|
29
|
-
desiredAccuracy?: LocationAccuracy;
|
|
30
|
-
/**
|
|
31
|
-
* Set `true` to persist each recorded location to the plugin's database.
|
|
32
|
-
* Defaults to `true` when [[State.enabled]], `false` otherwise.
|
|
33
|
-
*/
|
|
34
|
-
persist?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Arbitrary key/values to append to each recorded location.
|
|
37
|
-
*/
|
|
38
|
-
extras?: Extras;
|
|
39
|
-
/**
|
|
40
|
-
* Time in `milliseconds` to wait before firing error callback when location fails to arrive.
|
|
41
|
-
* Defaults to `60000`.
|
|
42
|
-
*/
|
|
43
|
-
timeout?: number;
|
|
44
|
-
}
|
|
45
|
-
}
|