@bglocation/capacitor 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CapacitorBackgroundLocation.podspec +19 -0
  2. package/LICENSE.md +97 -0
  3. package/Package.swift +44 -0
  4. package/README.md +264 -0
  5. package/android/build.gradle +74 -0
  6. package/android/src/main/AndroidManifest.xml +37 -0
  7. package/android/src/main/kotlin/dev/bglocation/BackgroundLocationPlugin.kt +684 -0
  8. package/android/src/main/kotlin/dev/bglocation/core/Models.kt +76 -0
  9. package/android/src/main/kotlin/dev/bglocation/core/battery/BGLBatteryHelper.kt +127 -0
  10. package/android/src/main/kotlin/dev/bglocation/core/boot/BGLBootCompletedReceiver.kt +32 -0
  11. package/android/src/main/kotlin/dev/bglocation/core/config/BGLConfigParser.kt +114 -0
  12. package/android/src/main/kotlin/dev/bglocation/core/config/BGLVersion.kt +6 -0
  13. package/android/src/main/kotlin/dev/bglocation/core/debug/BGLDebugLogger.kt +174 -0
  14. package/android/src/main/kotlin/dev/bglocation/core/geofence/BGLGeofenceBroadcastReceiver.kt +93 -0
  15. package/android/src/main/kotlin/dev/bglocation/core/geofence/BGLGeofenceManager.kt +310 -0
  16. package/android/src/main/kotlin/dev/bglocation/core/http/BGLHttpSender.kt +187 -0
  17. package/android/src/main/kotlin/dev/bglocation/core/http/BGLLocationBuffer.kt +152 -0
  18. package/android/src/main/kotlin/dev/bglocation/core/license/BGLBuildConfig.kt +16 -0
  19. package/android/src/main/kotlin/dev/bglocation/core/license/BGLLicenseEnforcer.kt +137 -0
  20. package/android/src/main/kotlin/dev/bglocation/core/license/BGLLicenseValidator.kt +134 -0
  21. package/android/src/main/kotlin/dev/bglocation/core/license/BGLTrialTimer.kt +176 -0
  22. package/android/src/main/kotlin/dev/bglocation/core/location/BGLAdaptiveFilter.kt +94 -0
  23. package/android/src/main/kotlin/dev/bglocation/core/location/BGLHeartbeatTimer.kt +38 -0
  24. package/android/src/main/kotlin/dev/bglocation/core/location/BGLLocationForegroundService.kt +289 -0
  25. package/android/src/main/kotlin/dev/bglocation/core/location/BGLLocationHelpers.kt +72 -0
  26. package/android/src/main/kotlin/dev/bglocation/core/location/BGLPermissionManager.kt +99 -0
  27. package/android/src/main/kotlin/dev/bglocation/core/notification/BGLNotificationHelper.kt +77 -0
  28. package/dist/esm/definitions.d.ts +390 -0
  29. package/dist/esm/definitions.js +3 -0
  30. package/dist/esm/definitions.js.map +1 -0
  31. package/dist/esm/index.d.ts +4 -0
  32. package/dist/esm/index.js +26 -0
  33. package/dist/esm/index.js.map +1 -0
  34. package/dist/esm/web.d.ts +47 -0
  35. package/dist/esm/web.js +231 -0
  36. package/dist/esm/web.js.map +1 -0
  37. package/dist/esm/web.test.d.ts +1 -0
  38. package/dist/esm/web.test.js +940 -0
  39. package/dist/esm/web.test.js.map +1 -0
  40. package/dist/plugin.cjs.js +267 -0
  41. package/dist/plugin.cjs.js.map +1 -0
  42. package/dist/plugin.js +270 -0
  43. package/dist/plugin.js.map +1 -0
  44. package/ios/Sources/BGLocationCore/Config/BGLConfigParser.swift +88 -0
  45. package/ios/Sources/BGLocationCore/Config/BGLVersion.swift +6 -0
  46. package/ios/Sources/BGLocationCore/Debug/BGLDebugLogger.swift +201 -0
  47. package/ios/Sources/BGLocationCore/Geofence/BGLGeofenceManager.swift +538 -0
  48. package/ios/Sources/BGLocationCore/Http/BGLHttpSender.swift +227 -0
  49. package/ios/Sources/BGLocationCore/Http/BGLLocationBuffer.swift +198 -0
  50. package/ios/Sources/BGLocationCore/License/BGLBuildConfig.swift +11 -0
  51. package/ios/Sources/BGLocationCore/License/BGLLicenseEnforcer.swift +134 -0
  52. package/ios/Sources/BGLocationCore/License/BGLLicenseValidator.swift +163 -0
  53. package/ios/Sources/BGLocationCore/License/BGLTrialTimer.swift +168 -0
  54. package/ios/Sources/BGLocationCore/Location/BGLAdaptiveFilter.swift +91 -0
  55. package/ios/Sources/BGLocationCore/Location/BGLHeartbeatTimer.swift +50 -0
  56. package/ios/Sources/BGLocationCore/Location/BGLLocationData.swift +48 -0
  57. package/ios/Sources/BGLocationCore/Location/BGLLocationHelpers.swift +42 -0
  58. package/ios/Sources/BGLocationCore/Location/BGLLocationManager.swift +268 -0
  59. package/ios/Sources/BGLocationCore/Location/BGLPermissionManager.swift +33 -0
  60. package/ios/Sources/BackgroundLocationPlugin/BackgroundLocationPlugin.swift +657 -0
  61. package/package.json +75 -0
@@ -0,0 +1,231 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import { GEOFENCE_MAX_COUNT } from './definitions';
3
+ /**
4
+ * Web fallback using navigator.geolocation.
5
+ * Used for development/testing in the browser only.
6
+ */
7
+ export class BackgroundLocationWeb extends WebPlugin {
8
+ watchId = null;
9
+ heartbeatTimer = null;
10
+ config = null;
11
+ httpConfig = null;
12
+ isTracking = false;
13
+ debug = false;
14
+ locationCount = 0;
15
+ heartbeatCount = 0;
16
+ httpSuccessCount = 0;
17
+ httpErrorCount = 0;
18
+ geofenceStore = new Map();
19
+ async getVersion() {
20
+ return { pluginVersion: '1.1.0', coreVersion: 'web' };
21
+ }
22
+ async checkPermissions() {
23
+ const result = await navigator.permissions.query({ name: 'geolocation' });
24
+ const state = result.state === 'granted' ? 'granted' : result.state === 'denied' ? 'denied' : 'prompt';
25
+ // Web has no separate background permission — mirror foreground state
26
+ return { location: state, backgroundLocation: state };
27
+ }
28
+ async requestPermissions() {
29
+ // Web API doesn't have explicit requestPermissions — permission is requested on first use.
30
+ return this.checkPermissions();
31
+ }
32
+ async configure(options) {
33
+ this.config = options;
34
+ this.httpConfig = options.http ?? null;
35
+ this.debug = options.debug ?? false;
36
+ this.resetCounters();
37
+ const distanceFilter = options.distanceFilter ?? 15;
38
+ const heartbeatInterval = options.heartbeatInterval ?? 15;
39
+ const distanceFilterMode = distanceFilter === 'auto' ? 'auto' : 'fixed';
40
+ if (distanceFilter === 'auto') {
41
+ this.emitDebug('CONFIGURE distanceFilter=auto ignored on Web — browser does not support native distance filtering');
42
+ }
43
+ this.emitDebug(`CONFIGURE distance=${distanceFilter}m heartbeat=${heartbeatInterval}s http=${options.http?.url ?? 'disabled'}`);
44
+ console.info('[BackgroundLocation:web] configured', options);
45
+ return { licenseMode: 'full', distanceFilterMode };
46
+ }
47
+ async start() {
48
+ if (!this.config) {
49
+ throw new Error('Plugin not configured. Call configure() first.');
50
+ }
51
+ this.watchId = navigator.geolocation.watchPosition((position) => {
52
+ const location = this.geolocationToLocation(position);
53
+ this.notifyListeners('onLocation', location);
54
+ this.locationCount++;
55
+ this.emitDebug(`LOCATION #${this.locationCount} (${location.latitude.toFixed(5)}, ${location.longitude.toFixed(5)}) acc=${location.accuracy.toFixed(1)}m`);
56
+ this.sendHttp(location);
57
+ }, (error) => {
58
+ console.error('[BackgroundLocation:web] watch error:', error.message);
59
+ }, {
60
+ enableHighAccuracy: (this.config.desiredAccuracy ?? 'high') === 'high',
61
+ maximumAge: 1000,
62
+ timeout: 20000,
63
+ });
64
+ this.startHeartbeat();
65
+ this.isTracking = true;
66
+ this.resetCounters();
67
+ this.emitDebug('START tracking');
68
+ return { enabled: true, tracking: true };
69
+ }
70
+ async stop() {
71
+ if (this.watchId !== null) {
72
+ navigator.geolocation.clearWatch(this.watchId);
73
+ this.watchId = null;
74
+ }
75
+ this.stopHeartbeat();
76
+ this.isTracking = false;
77
+ this.emitDebug(`STOP tracking — locations=${this.locationCount} heartbeats=${this.heartbeatCount} http_ok=${this.httpSuccessCount} http_err=${this.httpErrorCount}`);
78
+ const permissions = await this.checkPermissions();
79
+ return { enabled: permissions.location === 'granted', tracking: false };
80
+ }
81
+ async getState() {
82
+ const permissions = await this.checkPermissions();
83
+ return { enabled: permissions.location === 'granted', tracking: this.isTracking };
84
+ }
85
+ async removeAllListeners() {
86
+ if (this.watchId !== null) {
87
+ navigator.geolocation.clearWatch(this.watchId);
88
+ this.watchId = null;
89
+ }
90
+ this.stopHeartbeat();
91
+ this.isTracking = false;
92
+ await super.removeAllListeners();
93
+ }
94
+ async getCurrentPosition(options) {
95
+ return new Promise((resolve, reject) => {
96
+ navigator.geolocation.getCurrentPosition((position) => resolve(this.geolocationToLocation(position)), (error) => reject(new Error(error.message)), { enableHighAccuracy: true, timeout: options?.timeout ?? 20000 });
97
+ });
98
+ }
99
+ // B.1: Battery optimization — no-op on Web (not applicable to browsers)
100
+ async checkBatteryOptimization() {
101
+ return {
102
+ isIgnoringOptimizations: true,
103
+ manufacturer: '',
104
+ helpUrl: '',
105
+ message: 'Battery optimization is not applicable on Web platform.',
106
+ };
107
+ }
108
+ async requestBatteryOptimization() {
109
+ return this.checkBatteryOptimization();
110
+ }
111
+ // -----------------------------------------------------------------------
112
+ // Geofencing — in-memory stub for development/testing
113
+ // -----------------------------------------------------------------------
114
+ async addGeofence(geofence) {
115
+ if (this.geofenceStore.size >= GEOFENCE_MAX_COUNT && !this.geofenceStore.has(geofence.identifier)) {
116
+ throw new Error(`Geofence limit reached (max ${GEOFENCE_MAX_COUNT})`);
117
+ }
118
+ this.geofenceStore.set(geofence.identifier, { ...geofence });
119
+ this.emitDebug(`[GEOFENCE ADD] "${geofence.identifier}" (${this.geofenceStore.size}/${GEOFENCE_MAX_COUNT})`);
120
+ }
121
+ async addGeofences(options) {
122
+ for (const geofence of options.geofences) {
123
+ await this.addGeofence(geofence);
124
+ }
125
+ }
126
+ async removeGeofence(options) {
127
+ if (!this.geofenceStore.has(options.identifier)) {
128
+ throw new Error(`Geofence "${options.identifier}" not found`);
129
+ }
130
+ this.geofenceStore.delete(options.identifier);
131
+ this.emitDebug(`[GEOFENCE REMOVE] "${options.identifier}" (${this.geofenceStore.size}/${GEOFENCE_MAX_COUNT})`);
132
+ }
133
+ async removeAllGeofences() {
134
+ const count = this.geofenceStore.size;
135
+ this.geofenceStore.clear();
136
+ this.emitDebug(`[GEOFENCE REMOVE_ALL] removed ${count}`);
137
+ }
138
+ async getGeofences() {
139
+ return { geofences: Array.from(this.geofenceStore.values()) };
140
+ }
141
+ startHeartbeat() {
142
+ if (!this.config)
143
+ return;
144
+ this.heartbeatTimer = setInterval(() => {
145
+ navigator.geolocation.getCurrentPosition((position) => {
146
+ const location = this.geolocationToLocation(position);
147
+ this.notifyListeners('onHeartbeat', { location, timestamp: Date.now() });
148
+ this.heartbeatCount++;
149
+ this.emitDebug(`HEARTBEAT #${this.heartbeatCount} with location`);
150
+ }, (_error) => {
151
+ // Emit heartbeat with null location to match native platform behavior
152
+ this.notifyListeners('onHeartbeat', { location: null, timestamp: Date.now() });
153
+ this.heartbeatCount++;
154
+ this.emitDebug(`HEARTBEAT #${this.heartbeatCount} no location`);
155
+ });
156
+ }, (this.config.heartbeatInterval ?? 15) * 1000);
157
+ }
158
+ stopHeartbeat() {
159
+ if (this.heartbeatTimer !== null) {
160
+ clearInterval(this.heartbeatTimer);
161
+ this.heartbeatTimer = null;
162
+ }
163
+ }
164
+ geolocationToLocation(position) {
165
+ return {
166
+ latitude: position.coords.latitude,
167
+ longitude: position.coords.longitude,
168
+ accuracy: position.coords.accuracy,
169
+ speed: position.coords.speed ?? 0,
170
+ heading: position.coords.heading ?? -1,
171
+ altitude: position.coords.altitude ?? 0,
172
+ timestamp: position.timestamp,
173
+ isMoving: (position.coords.speed ?? 0) > 0.5,
174
+ isMock: false,
175
+ };
176
+ }
177
+ sendHttp(location) {
178
+ if (!this.httpConfig)
179
+ return;
180
+ const headers = {
181
+ 'Content-Type': 'application/json',
182
+ ...(this.httpConfig.headers ?? {}),
183
+ };
184
+ fetch(this.httpConfig.url, {
185
+ method: 'POST',
186
+ headers,
187
+ body: JSON.stringify({ location }),
188
+ })
189
+ .then(async (response) => {
190
+ const responseText = await response.text().catch(() => '');
191
+ if (response.ok) {
192
+ this.httpSuccessCount++;
193
+ this.emitDebug(`HTTP OK #${this.httpSuccessCount} status=${response.status}`);
194
+ }
195
+ else {
196
+ this.httpErrorCount++;
197
+ this.emitDebug(`HTTP ERROR #${this.httpErrorCount} status=${response.status}`);
198
+ }
199
+ this.notifyListeners('onHttp', {
200
+ statusCode: response.status,
201
+ success: response.ok,
202
+ responseText,
203
+ bufferedCount: 0,
204
+ });
205
+ })
206
+ .catch((error) => {
207
+ this.httpErrorCount++;
208
+ this.emitDebug(`HTTP ERROR #${this.httpErrorCount} status=0 error=${error.message}`);
209
+ this.notifyListeners('onHttp', {
210
+ statusCode: 0,
211
+ success: false,
212
+ responseText: '',
213
+ error: error.message,
214
+ bufferedCount: 0,
215
+ });
216
+ });
217
+ }
218
+ emitDebug(message) {
219
+ if (!this.debug)
220
+ return;
221
+ console.debug(`[BGL_DEBUG] ${message}`);
222
+ this.notifyListeners('onDebug', { message, timestamp: Date.now() });
223
+ }
224
+ resetCounters() {
225
+ this.locationCount = 0;
226
+ this.heartbeatCount = 0;
227
+ this.httpSuccessCount = 0;
228
+ this.httpErrorCount = 0;
229
+ }
230
+ }
231
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgB5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;;GAGG;AACH,MAAM,OAAO,qBACX,SAAQ,SAAS;IAGT,OAAO,GAAkB,IAAI,CAAC;IAC9B,cAAc,GAA0C,IAAI,CAAC;IAC7D,MAAM,GAA0B,IAAI,CAAC;IACrC,UAAU,GAAsB,IAAI,CAAC;IACrC,UAAU,GAAG,KAAK,CAAC;IACnB,KAAK,GAAG,KAAK,CAAC;IACd,aAAa,GAAG,CAAC,CAAC;IAClB,cAAc,GAAG,CAAC,CAAC;IACnB,gBAAgB,GAAG,CAAC,CAAC;IACrB,cAAc,GAAG,CAAC,CAAC;IACnB,aAAa,GAAG,IAAI,GAAG,EAAoB,CAAC;IAEpD,KAAK,CAAC,UAAU;QACd,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,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