@transistorsoft/background-geolocation-types 5.0.0-beta.1
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/LICENSE +21 -0
- package/README.md +137 -0
- package/dist/core/api/BackgroundGeolocation.d.ts +6 -0
- package/dist/core/api/BackgroundGeolocation.js +2 -0
- package/dist/core/api/CurrentPositionRequest.d.ts +44 -0
- package/dist/core/api/CurrentPositionRequest.js +2 -0
- package/dist/core/api/DeviceSettings.d.ts +77 -0
- package/dist/core/api/DeviceSettings.js +2 -0
- package/dist/core/api/Logger.d.ts +421 -0
- package/dist/core/api/Logger.js +2 -0
- package/dist/core/api/State.d.ts +75 -0
- package/dist/core/api/State.js +2 -0
- package/dist/core/config/ActivityConfig.d.ts +271 -0
- package/dist/core/config/ActivityConfig.js +2 -0
- package/dist/core/config/AppConfig.d.ts +599 -0
- package/dist/core/config/AppConfig.js +2 -0
- package/dist/core/config/AuthorizationConfig.d.ts +200 -0
- package/dist/core/config/AuthorizationConfig.js +2 -0
- package/dist/core/config/CompoundConfig.d.ts +19 -0
- package/dist/core/config/CompoundConfig.js +2 -0
- package/dist/core/config/Config.d.ts +149 -0
- package/dist/core/config/Config.js +2 -0
- package/dist/core/config/GeoConfig.d.ts +905 -0
- package/dist/core/config/GeoConfig.js +2 -0
- package/dist/core/config/HttpConfig.d.ts +579 -0
- package/dist/core/config/HttpConfig.js +2 -0
- package/dist/core/config/LocationFilter.d.ts +272 -0
- package/dist/core/config/LocationFilter.js +2 -0
- package/dist/core/config/LoggerConfig.d.ts +319 -0
- package/dist/core/config/LoggerConfig.js +2 -0
- package/dist/core/config/NotificationConfig.d.ts +519 -0
- package/dist/core/config/NotificationConfig.js +2 -0
- package/dist/core/config/PersistenceConfig.d.ts +552 -0
- package/dist/core/config/PersistenceConfig.js +2 -0
- package/dist/core/data/DeviceInfo.d.ts +61 -0
- package/dist/core/data/DeviceInfo.js +2 -0
- package/dist/core/data/Geofence.d.ts +16 -0
- package/dist/core/data/Geofence.js +2 -0
- package/dist/core/data/Location.d.ts +253 -0
- package/dist/core/data/Location.js +2 -0
- package/dist/core/data/Sensors.d.ts +30 -0
- package/dist/core/data/Sensors.js +2 -0
- package/dist/core/events/AuthorizationEvent.d.ts +15 -0
- package/dist/core/events/AuthorizationEvent.js +2 -0
- package/dist/core/events/ConnectivityChangeEvent.d.ts +9 -0
- package/dist/core/events/ConnectivityChangeEvent.js +2 -0
- package/dist/core/events/GeofenceEvent.d.ts +19 -0
- package/dist/core/events/GeofenceEvent.js +2 -0
- package/dist/core/events/GeofencesChangeEvent.d.ts +12 -0
- package/dist/core/events/GeofencesChangeEvent.js +2 -0
- package/dist/core/events/HeadlessEvent.d.ts +12 -0
- package/dist/core/events/HeadlessEvent.js +2 -0
- package/dist/core/events/HeartbeatEvent.d.ts +14 -0
- package/dist/core/events/HeartbeatEvent.js +2 -0
- package/dist/core/events/HttpEvent.d.ts +13 -0
- package/dist/core/events/HttpEvent.js +2 -0
- package/dist/core/events/MotionActivityEvent.d.ts +12 -0
- package/dist/core/events/MotionActivityEvent.js +2 -0
- package/dist/core/events/MotionChangeEvent.d.ts +12 -0
- package/dist/core/events/MotionChangeEvent.js +2 -0
- package/dist/core/events/ProviderChangeEvent.d.ts +17 -0
- package/dist/core/events/ProviderChangeEvent.js +2 -0
- package/dist/core/events/Subscription.d.ts +86 -0
- package/dist/core/events/Subscription.js +2 -0
- package/dist/docs-entry.d.ts +3 -0
- package/dist/docs-entry.js +20 -0
- package/dist/enums/AccuracyAuthorization.d.ts +16 -0
- package/dist/enums/AccuracyAuthorization.js +19 -0
- package/dist/enums/ActivityType.d.ts +28 -0
- package/dist/enums/ActivityType.js +31 -0
- package/dist/enums/AuthorizationStatus.d.ts +20 -0
- package/dist/enums/AuthorizationStatus.js +23 -0
- package/dist/enums/AuthorizationStrategy.d.ts +10 -0
- package/dist/enums/AuthorizationStrategy.js +13 -0
- package/dist/enums/DesiredAccuracy.d.ts +13 -0
- package/dist/enums/DesiredAccuracy.js +16 -0
- package/dist/enums/Event.d.ts +21 -0
- package/dist/enums/Event.js +24 -0
- package/dist/enums/GeofenceAction.d.ts +18 -0
- package/dist/enums/GeofenceAction.js +21 -0
- package/dist/enums/HttpMethod.d.ts +11 -0
- package/dist/enums/HttpMethod.js +14 -0
- package/dist/enums/KalmanProfile.d.ts +30 -0
- package/dist/enums/KalmanProfile.js +33 -0
- package/dist/enums/LocationError.d.ts +23 -0
- package/dist/enums/LocationError.js +26 -0
- package/dist/enums/LocationFilterPolicy.d.ts +108 -0
- package/dist/enums/LocationFilterPolicy.js +111 -0
- package/dist/enums/LogLevel.d.ts +13 -0
- package/dist/enums/LogLevel.js +16 -0
- package/dist/enums/LogLevelName.d.ts +1 -0
- package/dist/enums/LogLevelName.js +15 -0
- package/dist/enums/MotionActivityType.d.ts +14 -0
- package/dist/enums/MotionActivityType.js +17 -0
- package/dist/enums/NotificationPriority.d.ts +22 -0
- package/dist/enums/NotificationPriority.js +25 -0
- package/dist/enums/PersistMode.d.ts +12 -0
- package/dist/enums/PersistMode.js +15 -0
- package/dist/enums/SQLQueryOrder.d.ts +16 -0
- package/dist/enums/SQLQueryOrder.js +17 -0
- package/dist/enums/TrackingMode.d.ts +14 -0
- package/dist/enums/TrackingMode.js +17 -0
- package/dist/enums/TriggerActivity.d.ts +13 -0
- package/dist/enums/TriggerActivity.js +16 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +69 -0
- package/dist/legacy/LegacyConfig.d.ts +24 -0
- package/dist/legacy/LegacyConfig.js +2 -0
- package/package.json +50 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivityType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* iOS Activity Type used with {@link GeoConfig.activityType}.
|
|
6
|
+
*
|
|
7
|
+
* Corresponds to Apple's `CLActivityType` enum:
|
|
8
|
+
* https://developer.apple.com/documentation/corelocation/clactivitytype
|
|
9
|
+
*
|
|
10
|
+
* | Name | Value | Description |
|
|
11
|
+
* |------------------------|:-----:|---------------------------------------|
|
|
12
|
+
* | Other | 1 | Default/unspecified activity. |
|
|
13
|
+
* | AutomotiveNavigation | 2 | Automotive navigation mode. |
|
|
14
|
+
* | Fitness | 3 | Fitness-related activity. |
|
|
15
|
+
* | OtherNavigation | 4 | Non-automotive navigation mode. |
|
|
16
|
+
* | Airborne | 5 | Airborne activity (iOS 15+). |
|
|
17
|
+
*
|
|
18
|
+
* @category Config
|
|
19
|
+
*/
|
|
20
|
+
exports.ActivityType = {
|
|
21
|
+
/** Default/unspecified activity. */
|
|
22
|
+
Other: 1,
|
|
23
|
+
/** Automotive navigation activity. */
|
|
24
|
+
AutomotiveNavigation: 2,
|
|
25
|
+
/** Fitness (walking, running, etc). */
|
|
26
|
+
Fitness: 3,
|
|
27
|
+
/** Other navigation (non-automotive). */
|
|
28
|
+
OtherNavigation: 4,
|
|
29
|
+
/** Airborne activity (iOS 15+). */
|
|
30
|
+
Airborne: 5,
|
|
31
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* iOS/Android location authorization status.
|
|
3
|
+
*
|
|
4
|
+
* | Name | Value | Platform |
|
|
5
|
+
* |---------------------|:-----:|-------------------------|
|
|
6
|
+
* | NotDetermined | 0 | iOS only |
|
|
7
|
+
* | Restricted | 1 | iOS only |
|
|
8
|
+
* | Denied | 2 | iOS & Android |
|
|
9
|
+
* | Always | 3 | iOS & Android |
|
|
10
|
+
* | WhenInUse | 4 | iOS & Android 10+ |
|
|
11
|
+
*
|
|
12
|
+
* @category Events
|
|
13
|
+
*/
|
|
14
|
+
export declare const AuthorizationStatus: {
|
|
15
|
+
readonly NotDetermined: 0;
|
|
16
|
+
readonly Restricted: 1;
|
|
17
|
+
readonly Denied: 2;
|
|
18
|
+
readonly Always: 3;
|
|
19
|
+
readonly WhenInUse: 4;
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthorizationStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* iOS/Android location authorization status.
|
|
6
|
+
*
|
|
7
|
+
* | Name | Value | Platform |
|
|
8
|
+
* |---------------------|:-----:|-------------------------|
|
|
9
|
+
* | NotDetermined | 0 | iOS only |
|
|
10
|
+
* | Restricted | 1 | iOS only |
|
|
11
|
+
* | Denied | 2 | iOS & Android |
|
|
12
|
+
* | Always | 3 | iOS & Android |
|
|
13
|
+
* | WhenInUse | 4 | iOS & Android 10+ |
|
|
14
|
+
*
|
|
15
|
+
* @category Events
|
|
16
|
+
*/
|
|
17
|
+
exports.AuthorizationStatus = {
|
|
18
|
+
NotDetermined: 0,
|
|
19
|
+
Restricted: 1,
|
|
20
|
+
Denied: 2,
|
|
21
|
+
Always: 3,
|
|
22
|
+
WhenInUse: 4,
|
|
23
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthorizationStrategy = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Supported authorization strategies.
|
|
6
|
+
* Mirrors Flutter's Authorization.strategy values.
|
|
7
|
+
*
|
|
8
|
+
* @category Config
|
|
9
|
+
*/
|
|
10
|
+
exports.AuthorizationStrategy = {
|
|
11
|
+
Jwt: 'jwt',
|
|
12
|
+
Sas: 'sas'
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Desired accuracy presets (meters / platform-tuned).
|
|
3
|
+
*
|
|
4
|
+
* @category Config
|
|
5
|
+
*/
|
|
6
|
+
export declare const DesiredAccuracy: {
|
|
7
|
+
readonly Navigation: -2;
|
|
8
|
+
readonly High: -1;
|
|
9
|
+
readonly Medium: 10;
|
|
10
|
+
readonly Low: 100;
|
|
11
|
+
readonly VeryLow: 1000;
|
|
12
|
+
readonly Lowest: 3000;
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DesiredAccuracy = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Desired accuracy presets (meters / platform-tuned).
|
|
6
|
+
*
|
|
7
|
+
* @category Config
|
|
8
|
+
*/
|
|
9
|
+
exports.DesiredAccuracy = {
|
|
10
|
+
Navigation: -2,
|
|
11
|
+
High: -1,
|
|
12
|
+
Medium: 10,
|
|
13
|
+
Low: 100,
|
|
14
|
+
VeryLow: 1000,
|
|
15
|
+
Lowest: 3000
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported event names emitted by the SDK.
|
|
3
|
+
*
|
|
4
|
+
* @category Events
|
|
5
|
+
*/
|
|
6
|
+
export declare const Event: {
|
|
7
|
+
readonly Location: "location";
|
|
8
|
+
readonly MotionChange: "motionchange";
|
|
9
|
+
readonly ActivityChange: "activitychange";
|
|
10
|
+
readonly Geofence: "geofence";
|
|
11
|
+
readonly GeofencesChange: "geofenceschange";
|
|
12
|
+
readonly Http: "http";
|
|
13
|
+
readonly Heartbeat: "heartbeat";
|
|
14
|
+
readonly ProviderChange: "providerchange";
|
|
15
|
+
readonly Authorization: "authorization";
|
|
16
|
+
readonly ConnectivityChange: "connectivitychange";
|
|
17
|
+
readonly EnabledChange: "enabledchange";
|
|
18
|
+
readonly PowerSaveChange: "powersavechange";
|
|
19
|
+
readonly Schedule: "schedule";
|
|
20
|
+
readonly Notification: "notification";
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Event = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Supported event names emitted by the SDK.
|
|
6
|
+
*
|
|
7
|
+
* @category Events
|
|
8
|
+
*/
|
|
9
|
+
exports.Event = {
|
|
10
|
+
Location: 'location',
|
|
11
|
+
MotionChange: 'motionchange',
|
|
12
|
+
ActivityChange: 'activitychange',
|
|
13
|
+
Geofence: 'geofence',
|
|
14
|
+
GeofencesChange: 'geofenceschange',
|
|
15
|
+
Http: 'http',
|
|
16
|
+
Heartbeat: 'heartbeat',
|
|
17
|
+
ProviderChange: 'providerchange',
|
|
18
|
+
Authorization: 'authorization',
|
|
19
|
+
ConnectivityChange: 'connectivitychange',
|
|
20
|
+
EnabledChange: 'enabledchange',
|
|
21
|
+
PowerSaveChange: 'powersavechange',
|
|
22
|
+
Schedule: 'schedule',
|
|
23
|
+
Notification: 'notification'
|
|
24
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geofence transition actions emitted by the SDK
|
|
3
|
+
*
|
|
4
|
+
* Used with {@link GeofenceEvent} from {@link BackgroundGeolocation.onGeofence}.
|
|
5
|
+
*
|
|
6
|
+
* | Action | Meaning |
|
|
7
|
+
* |--------|------------------------------|
|
|
8
|
+
* | ENTER | Device entered the geofence |
|
|
9
|
+
* | EXIT | Device exited the geofence |
|
|
10
|
+
* | DWELL | Device dwelled inside |
|
|
11
|
+
*
|
|
12
|
+
* @category Events
|
|
13
|
+
*/
|
|
14
|
+
export declare const GeofenceAction: {
|
|
15
|
+
readonly Enter: "ENTER";
|
|
16
|
+
readonly Exit: "EXIT";
|
|
17
|
+
readonly Dwell: "DWELL";
|
|
18
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GeofenceAction = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Geofence transition actions emitted by the SDK
|
|
6
|
+
*
|
|
7
|
+
* Used with {@link GeofenceEvent} from {@link BackgroundGeolocation.onGeofence}.
|
|
8
|
+
*
|
|
9
|
+
* | Action | Meaning |
|
|
10
|
+
* |--------|------------------------------|
|
|
11
|
+
* | ENTER | Device entered the geofence |
|
|
12
|
+
* | EXIT | Device exited the geofence |
|
|
13
|
+
* | DWELL | Device dwelled inside |
|
|
14
|
+
*
|
|
15
|
+
* @category Events
|
|
16
|
+
*/
|
|
17
|
+
exports.GeofenceAction = {
|
|
18
|
+
Enter: 'ENTER',
|
|
19
|
+
Exit: 'EXIT',
|
|
20
|
+
Dwell: 'DWELL'
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpMethod = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Allowed HTTP methods for uploading data.
|
|
6
|
+
* Mirrors Flutter's HttpConfig.method and native support.
|
|
7
|
+
*
|
|
8
|
+
* @category Config
|
|
9
|
+
*/
|
|
10
|
+
exports.HttpMethod = {
|
|
11
|
+
Post: 'POST',
|
|
12
|
+
Put: 'PUT',
|
|
13
|
+
Patch: 'PATCH'
|
|
14
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the preset tuning profile for the Kalman filter used in location
|
|
3
|
+
* denoising.
|
|
4
|
+
*
|
|
5
|
+
* Each profile adjusts the Kalman filter’s process and measurement noise
|
|
6
|
+
* parameters, trading off between responsiveness and smoothness:
|
|
7
|
+
*
|
|
8
|
+
* | Profile | Behavior |
|
|
9
|
+
* |----------------------|---------------------------------------------------------------------|
|
|
10
|
+
* | `defaultProfile` | **Balanced** — General-purpose; suitable for most movement types. |
|
|
11
|
+
* | `aggressive` | **Aggressive** — Fast response; minimal smoothing. |
|
|
12
|
+
* | `conservative` | **Conservative** — Maximum smoothing; slowest response to changes. |
|
|
13
|
+
*
|
|
14
|
+
* - If no profile is provided, `defaultProfile` is applied.
|
|
15
|
+
* - Use `aggressive` for fast-changing activities requiring rapid updates.
|
|
16
|
+
* - Use `conservative` when stability and track smoothness are more important
|
|
17
|
+
* than immediate responsiveness.
|
|
18
|
+
*
|
|
19
|
+
* This maps directly to native Kalman tuning implementations on both Android and iOS.
|
|
20
|
+
*
|
|
21
|
+
* @category Config
|
|
22
|
+
*/
|
|
23
|
+
export declare const KalmanProfile: {
|
|
24
|
+
/** Balanced for general-purpose movement (default). */
|
|
25
|
+
readonly Default: 0;
|
|
26
|
+
/** Aggressive — responds faster to motion with less smoothing. */
|
|
27
|
+
readonly Aggressive: 1;
|
|
28
|
+
/** Conservative — maximum smoothing, slower reaction to change. */
|
|
29
|
+
readonly Conservative: 2;
|
|
30
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KalmanProfile = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Specifies the preset tuning profile for the Kalman filter used in location
|
|
6
|
+
* denoising.
|
|
7
|
+
*
|
|
8
|
+
* Each profile adjusts the Kalman filter’s process and measurement noise
|
|
9
|
+
* parameters, trading off between responsiveness and smoothness:
|
|
10
|
+
*
|
|
11
|
+
* | Profile | Behavior |
|
|
12
|
+
* |----------------------|---------------------------------------------------------------------|
|
|
13
|
+
* | `defaultProfile` | **Balanced** — General-purpose; suitable for most movement types. |
|
|
14
|
+
* | `aggressive` | **Aggressive** — Fast response; minimal smoothing. |
|
|
15
|
+
* | `conservative` | **Conservative** — Maximum smoothing; slowest response to changes. |
|
|
16
|
+
*
|
|
17
|
+
* - If no profile is provided, `defaultProfile` is applied.
|
|
18
|
+
* - Use `aggressive` for fast-changing activities requiring rapid updates.
|
|
19
|
+
* - Use `conservative` when stability and track smoothness are more important
|
|
20
|
+
* than immediate responsiveness.
|
|
21
|
+
*
|
|
22
|
+
* This maps directly to native Kalman tuning implementations on both Android and iOS.
|
|
23
|
+
*
|
|
24
|
+
* @category Config
|
|
25
|
+
*/
|
|
26
|
+
exports.KalmanProfile = {
|
|
27
|
+
/** Balanced for general-purpose movement (default). */
|
|
28
|
+
Default: 0,
|
|
29
|
+
/** Aggressive — responds faster to motion with less smoothing. */
|
|
30
|
+
Aggressive: 1,
|
|
31
|
+
/** Conservative — maximum smoothing, slower reaction to change. */
|
|
32
|
+
Conservative: 2
|
|
33
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error codes returned when the native location API fails to fetch a location.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* | Code | Error |
|
|
6
|
+
* |------|--------|
|
|
7
|
+
* | `0` | Location unknown |
|
|
8
|
+
* | `1` | Location permission denied |
|
|
9
|
+
* | `2` | Network error |
|
|
10
|
+
* | `3` | Attempt to initiate location-services in background with WhenInUse authorization |
|
|
11
|
+
* | `408` | Location timeout |
|
|
12
|
+
* | `499` | Location request cancelled |
|
|
13
|
+
*
|
|
14
|
+
* @category Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const LocationError: {
|
|
17
|
+
readonly LocationUnknown: 0;
|
|
18
|
+
readonly PermissionDenied: 1;
|
|
19
|
+
readonly NetworkError: 2;
|
|
20
|
+
readonly BackgroundWhenInUse: 3;
|
|
21
|
+
readonly Timeout: 408;
|
|
22
|
+
readonly Cancelled: 499;
|
|
23
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocationError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Error codes returned when the native location API fails to fetch a location.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* | Code | Error |
|
|
9
|
+
* |------|--------|
|
|
10
|
+
* | `0` | Location unknown |
|
|
11
|
+
* | `1` | Location permission denied |
|
|
12
|
+
* | `2` | Network error |
|
|
13
|
+
* | `3` | Attempt to initiate location-services in background with WhenInUse authorization |
|
|
14
|
+
* | `408` | Location timeout |
|
|
15
|
+
* | `499` | Location request cancelled |
|
|
16
|
+
*
|
|
17
|
+
* @category Events
|
|
18
|
+
*/
|
|
19
|
+
exports.LocationError = {
|
|
20
|
+
LocationUnknown: 0,
|
|
21
|
+
PermissionDenied: 1,
|
|
22
|
+
NetworkError: 2,
|
|
23
|
+
BackgroundWhenInUse: 3,
|
|
24
|
+
Timeout: 408,
|
|
25
|
+
Cancelled: 499,
|
|
26
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the filtering policy applied to incoming raw GPS samples before they
|
|
3
|
+
* are accepted, averaged, or rejected by the {@link LocationFilter}.
|
|
4
|
+
*
|
|
5
|
+
* The filtering policy determines how aggressively the plugin removes noisy,
|
|
6
|
+
* inaccurate, or redundant location updates. It represents the *first stage*
|
|
7
|
+
* in the SDK’s data-quality pipeline — before Kalman smoothing, burst averaging,
|
|
8
|
+
* or other denoising steps are applied.
|
|
9
|
+
*
|
|
10
|
+
* Choosing the correct policy depends on your app’s tolerance for jitter versus
|
|
11
|
+
* responsiveness:
|
|
12
|
+
*
|
|
13
|
+
* - Fitness or vehicle-tracking apps often prefer stronger filtering.
|
|
14
|
+
* - Survey or scientific apps may prefer capturing unmodified raw samples.
|
|
15
|
+
*
|
|
16
|
+
* **Profiles**
|
|
17
|
+
*
|
|
18
|
+
* | Policy | Description | Use Case |
|
|
19
|
+
* |--------|-------------|----------|
|
|
20
|
+
* | {@link LocationFilterPolicy.PassThrough} | **No filtering.** Every received sample is recorded, even if noisy or identical to the previous one. | Debugging, diagnostics, scenarios requiring raw data. |
|
|
21
|
+
* | {@link LocationFilterPolicy.Adjust} | **Balanced filtering.** Smooths and rejects only clearly invalid samples. *(Default)* | Most use cases — walking, cycling, automotive tracking. |
|
|
22
|
+
* | {@link LocationFilterPolicy.Conservative} | **Strict filtering.** Strongly smooths data and rejects high-variance samples, prioritizing stability over responsiveness. | Analytics, long-term background logging, noise-sensitive applications. |
|
|
23
|
+
*
|
|
24
|
+
* **Notes**
|
|
25
|
+
*
|
|
26
|
+
* - This policy affects only the SDK’s *internal* filtering pipeline.
|
|
27
|
+
* It does **not** modify the raw values returned to {@link BackgroundGeolocation.onLocation}.
|
|
28
|
+
* - For more granular tuning, see {@link LocationFilter.trackingAccuracyThreshold},
|
|
29
|
+
* {@link LocationFilter.maxImpliedSpeed}, and other {@link LocationFilter} fields.
|
|
30
|
+
*
|
|
31
|
+
* **Examples**
|
|
32
|
+
*
|
|
33
|
+
* Balanced default filtering:
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* BackgroundGeolocation.ready({
|
|
37
|
+
* geolocation: {
|
|
38
|
+
* filter: {
|
|
39
|
+
* policy: LocationFilterPolicy.Adjust
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* No filtering — capture all raw locations:
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* BackgroundGeolocation.ready({
|
|
49
|
+
* geolocation: {
|
|
50
|
+
* filter: {
|
|
51
|
+
* policy: LocationFilterPolicy.PassThrough
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* Maximum smoothing for analytics:
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* BackgroundGeolocation.ready({
|
|
61
|
+
* geolocation: {
|
|
62
|
+
* filter: {
|
|
63
|
+
* policy: LocationFilterPolicy.Conservative
|
|
64
|
+
* }
|
|
65
|
+
* }
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* **See also**
|
|
70
|
+
* - {@link GeoConfig.filter}
|
|
71
|
+
* - {@link LocationFilter}
|
|
72
|
+
* - {@link KalmanProfile}
|
|
73
|
+
*
|
|
74
|
+
* @category Config
|
|
75
|
+
*/
|
|
76
|
+
export declare const LocationFilterPolicy: {
|
|
77
|
+
/** No filtering — accept all samples. Useful for debugging. */
|
|
78
|
+
readonly PassThrough: 0;
|
|
79
|
+
/**
|
|
80
|
+
* Balanced (default) — applies moderate filtering to reject noisy samples.
|
|
81
|
+
*
|
|
82
|
+
* Dynamically adjusts acceptance thresholds for incoming samples, but **never**
|
|
83
|
+
* alters the raw latitude/longitude coordinates.
|
|
84
|
+
*
|
|
85
|
+
* When using {@link LocationFilterPolicy.Adjust} (the default), the SDK computes
|
|
86
|
+
* motion metrics such as:
|
|
87
|
+
*
|
|
88
|
+
* - distance deltas
|
|
89
|
+
* - implied speed
|
|
90
|
+
* - accuracy variance
|
|
91
|
+
* - heading stability
|
|
92
|
+
*
|
|
93
|
+
* It then applies adaptive gating rules to decide whether each sample should be:
|
|
94
|
+
*
|
|
95
|
+
* - accepted
|
|
96
|
+
* - ignored
|
|
97
|
+
* - rejected as noise
|
|
98
|
+
*
|
|
99
|
+
* **Coordinates are never modified.** This policy adjusts *which* samples are
|
|
100
|
+
* included, not *how* they are positioned.
|
|
101
|
+
*
|
|
102
|
+
* If {@link LocationFilter.useKalman} is enabled, additional smoothing may occur,
|
|
103
|
+
* but the physical coordinates of each accepted sample remain untouched.
|
|
104
|
+
*/
|
|
105
|
+
readonly Adjust: 1;
|
|
106
|
+
/** Aggressive — filters heavily, preferring stability over responsiveness. */
|
|
107
|
+
readonly Conservative: 2;
|
|
108
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocationFilterPolicy = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Defines the filtering policy applied to incoming raw GPS samples before they
|
|
6
|
+
* are accepted, averaged, or rejected by the {@link LocationFilter}.
|
|
7
|
+
*
|
|
8
|
+
* The filtering policy determines how aggressively the plugin removes noisy,
|
|
9
|
+
* inaccurate, or redundant location updates. It represents the *first stage*
|
|
10
|
+
* in the SDK’s data-quality pipeline — before Kalman smoothing, burst averaging,
|
|
11
|
+
* or other denoising steps are applied.
|
|
12
|
+
*
|
|
13
|
+
* Choosing the correct policy depends on your app’s tolerance for jitter versus
|
|
14
|
+
* responsiveness:
|
|
15
|
+
*
|
|
16
|
+
* - Fitness or vehicle-tracking apps often prefer stronger filtering.
|
|
17
|
+
* - Survey or scientific apps may prefer capturing unmodified raw samples.
|
|
18
|
+
*
|
|
19
|
+
* **Profiles**
|
|
20
|
+
*
|
|
21
|
+
* | Policy | Description | Use Case |
|
|
22
|
+
* |--------|-------------|----------|
|
|
23
|
+
* | {@link LocationFilterPolicy.PassThrough} | **No filtering.** Every received sample is recorded, even if noisy or identical to the previous one. | Debugging, diagnostics, scenarios requiring raw data. |
|
|
24
|
+
* | {@link LocationFilterPolicy.Adjust} | **Balanced filtering.** Smooths and rejects only clearly invalid samples. *(Default)* | Most use cases — walking, cycling, automotive tracking. |
|
|
25
|
+
* | {@link LocationFilterPolicy.Conservative} | **Strict filtering.** Strongly smooths data and rejects high-variance samples, prioritizing stability over responsiveness. | Analytics, long-term background logging, noise-sensitive applications. |
|
|
26
|
+
*
|
|
27
|
+
* **Notes**
|
|
28
|
+
*
|
|
29
|
+
* - This policy affects only the SDK’s *internal* filtering pipeline.
|
|
30
|
+
* It does **not** modify the raw values returned to {@link BackgroundGeolocation.onLocation}.
|
|
31
|
+
* - For more granular tuning, see {@link LocationFilter.trackingAccuracyThreshold},
|
|
32
|
+
* {@link LocationFilter.maxImpliedSpeed}, and other {@link LocationFilter} fields.
|
|
33
|
+
*
|
|
34
|
+
* **Examples**
|
|
35
|
+
*
|
|
36
|
+
* Balanced default filtering:
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* BackgroundGeolocation.ready({
|
|
40
|
+
* geolocation: {
|
|
41
|
+
* filter: {
|
|
42
|
+
* policy: LocationFilterPolicy.Adjust
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* No filtering — capture all raw locations:
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* BackgroundGeolocation.ready({
|
|
52
|
+
* geolocation: {
|
|
53
|
+
* filter: {
|
|
54
|
+
* policy: LocationFilterPolicy.PassThrough
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* Maximum smoothing for analytics:
|
|
61
|
+
*
|
|
62
|
+
* ```ts
|
|
63
|
+
* BackgroundGeolocation.ready({
|
|
64
|
+
* geolocation: {
|
|
65
|
+
* filter: {
|
|
66
|
+
* policy: LocationFilterPolicy.Conservative
|
|
67
|
+
* }
|
|
68
|
+
* }
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* **See also**
|
|
73
|
+
* - {@link GeoConfig.filter}
|
|
74
|
+
* - {@link LocationFilter}
|
|
75
|
+
* - {@link KalmanProfile}
|
|
76
|
+
*
|
|
77
|
+
* @category Config
|
|
78
|
+
*/
|
|
79
|
+
exports.LocationFilterPolicy = {
|
|
80
|
+
/** No filtering — accept all samples. Useful for debugging. */
|
|
81
|
+
PassThrough: 0,
|
|
82
|
+
/**
|
|
83
|
+
* Balanced (default) — applies moderate filtering to reject noisy samples.
|
|
84
|
+
*
|
|
85
|
+
* Dynamically adjusts acceptance thresholds for incoming samples, but **never**
|
|
86
|
+
* alters the raw latitude/longitude coordinates.
|
|
87
|
+
*
|
|
88
|
+
* When using {@link LocationFilterPolicy.Adjust} (the default), the SDK computes
|
|
89
|
+
* motion metrics such as:
|
|
90
|
+
*
|
|
91
|
+
* - distance deltas
|
|
92
|
+
* - implied speed
|
|
93
|
+
* - accuracy variance
|
|
94
|
+
* - heading stability
|
|
95
|
+
*
|
|
96
|
+
* It then applies adaptive gating rules to decide whether each sample should be:
|
|
97
|
+
*
|
|
98
|
+
* - accepted
|
|
99
|
+
* - ignored
|
|
100
|
+
* - rejected as noise
|
|
101
|
+
*
|
|
102
|
+
* **Coordinates are never modified.** This policy adjusts *which* samples are
|
|
103
|
+
* included, not *how* they are positioned.
|
|
104
|
+
*
|
|
105
|
+
* If {@link LocationFilter.useKalman} is enabled, additional smoothing may occur,
|
|
106
|
+
* but the physical coordinates of each accepted sample remain untouched.
|
|
107
|
+
*/
|
|
108
|
+
Adjust: 1,
|
|
109
|
+
/** Aggressive — filters heavily, preferring stability over responsiveness. */
|
|
110
|
+
Conservative: 2
|
|
111
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLevel = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Controls the verbosity of plugin logging.
|
|
6
|
+
*
|
|
7
|
+
* @category Config
|
|
8
|
+
*/
|
|
9
|
+
exports.LogLevel = {
|
|
10
|
+
Off: 0,
|
|
11
|
+
Error: 1,
|
|
12
|
+
Warning: 2,
|
|
13
|
+
Info: 3,
|
|
14
|
+
Debug: 4,
|
|
15
|
+
Verbose: 5
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLevelName = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Log severity level used by {@link Logger.debug} {@link Logger.info}, etc.
|
|
6
|
+
* @hidden
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
exports.LogLevelName = {
|
|
10
|
+
Debug: "debug",
|
|
11
|
+
Notice: "notice",
|
|
12
|
+
Info: "info",
|
|
13
|
+
Warn: "warn",
|
|
14
|
+
Error: "error"
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reported device motion activity names (legacy RN + native).
|
|
3
|
+
*
|
|
4
|
+
* @category Events
|
|
5
|
+
*/
|
|
6
|
+
export declare const MotionActivityType: {
|
|
7
|
+
readonly Still: "still";
|
|
8
|
+
readonly Walking: "walking";
|
|
9
|
+
readonly OnFoot: "on_foot";
|
|
10
|
+
readonly Running: "running";
|
|
11
|
+
readonly OnBicycle: "on_bicycle";
|
|
12
|
+
readonly InVehicle: "in_vehicle";
|
|
13
|
+
readonly Unknown: "unknown";
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MotionActivityType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Reported device motion activity names (legacy RN + native).
|
|
6
|
+
*
|
|
7
|
+
* @category Events
|
|
8
|
+
*/
|
|
9
|
+
exports.MotionActivityType = {
|
|
10
|
+
Still: 'still',
|
|
11
|
+
Walking: 'walking',
|
|
12
|
+
OnFoot: 'on_foot',
|
|
13
|
+
Running: 'running',
|
|
14
|
+
OnBicycle: 'on_bicycle',
|
|
15
|
+
InVehicle: 'in_vehicle',
|
|
16
|
+
Unknown: 'unknown'
|
|
17
|
+
};
|