react-native-background-geolocation 5.0.2 → 5.0.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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
|
|
3
3
|
"name": "react-native-background-geolocation",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"description": "The most sophisticated cross-platform background location-tracking & geofencing module with battery-conscious motion-detection intelligence",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "yarn run build:expo",
|
package/src/Logger.js
CHANGED
|
@@ -13,19 +13,7 @@ const ORDER_ASC = 1;
|
|
|
13
13
|
const ORDER_DESC = -1;
|
|
14
14
|
|
|
15
15
|
function log(level, msg) {
|
|
16
|
-
|
|
17
|
-
// fallback to debug if missing.
|
|
18
|
-
if (
|
|
19
|
-
NativeModule.logger &&
|
|
20
|
-
typeof NativeModule.logger[level] === 'function'
|
|
21
|
-
) {
|
|
22
|
-
NativeModule.logger[level](msg);
|
|
23
|
-
} else if (
|
|
24
|
-
NativeModule.logger &&
|
|
25
|
-
typeof NativeModule.logger.debug === 'function'
|
|
26
|
-
) {
|
|
27
|
-
NativeModule.logger.debug(msg);
|
|
28
|
-
}
|
|
16
|
+
return NativeModule.log(level, msg);
|
|
29
17
|
}
|
|
30
18
|
|
|
31
19
|
function validateQuery(query) {
|
|
@@ -43,11 +31,11 @@ export default class Logger {
|
|
|
43
31
|
static get ORDER_ASC() { return ORDER_ASC; }
|
|
44
32
|
static get ORDER_DESC() { return ORDER_DESC; }
|
|
45
33
|
|
|
46
|
-
static debug(msg) { log(LOG_LEVEL_DEBUG, msg); }
|
|
47
|
-
static error(msg) { log(LOG_LEVEL_ERROR, msg); }
|
|
48
|
-
static warn(msg) { log(LOG_LEVEL_WARN, msg); }
|
|
49
|
-
static info(msg) { log(LOG_LEVEL_INFO, msg); }
|
|
50
|
-
static notice(msg) { log(LOG_LEVEL_NOTICE, msg); }
|
|
34
|
+
static debug(msg) { return log(LOG_LEVEL_DEBUG, msg); }
|
|
35
|
+
static error(msg) { return log(LOG_LEVEL_ERROR, msg); }
|
|
36
|
+
static warn(msg) { return log(LOG_LEVEL_WARN, msg); }
|
|
37
|
+
static info(msg) { return log(LOG_LEVEL_INFO, msg); }
|
|
38
|
+
static notice(msg) { return log(LOG_LEVEL_NOTICE, msg); }
|
|
51
39
|
|
|
52
40
|
static getLog(query) {
|
|
53
41
|
return NativeModule.getLog(validateQuery(query));
|
package/src/NativeModule.js
CHANGED
|
@@ -51,31 +51,31 @@ const PLATFORM_IOS = "ios";
|
|
|
51
51
|
*/
|
|
52
52
|
const LOGGER = {
|
|
53
53
|
error: function(msg) {
|
|
54
|
-
RNBackgroundGeolocation.log('error', msg);
|
|
54
|
+
return RNBackgroundGeolocation.log('error', msg);
|
|
55
55
|
},
|
|
56
56
|
warn: function(msg) {
|
|
57
|
-
RNBackgroundGeolocation.log('warn', msg);
|
|
57
|
+
return RNBackgroundGeolocation.log('warn', msg);
|
|
58
58
|
},
|
|
59
59
|
debug: function(msg) {
|
|
60
|
-
RNBackgroundGeolocation.log('debug', msg);
|
|
60
|
+
return RNBackgroundGeolocation.log('debug', msg);
|
|
61
61
|
},
|
|
62
62
|
info: function(msg) {
|
|
63
|
-
RNBackgroundGeolocation.log('info', msg);
|
|
63
|
+
return RNBackgroundGeolocation.log('info', msg);
|
|
64
64
|
},
|
|
65
65
|
notice: function(msg) {
|
|
66
|
-
RNBackgroundGeolocation.log('notice', msg);
|
|
66
|
+
return RNBackgroundGeolocation.log('notice', msg);
|
|
67
67
|
},
|
|
68
68
|
header: function(msg) {
|
|
69
|
-
RNBackgroundGeolocation.log('header', msg);
|
|
69
|
+
return RNBackgroundGeolocation.log('header', msg);
|
|
70
70
|
},
|
|
71
71
|
on: function(msg) {
|
|
72
|
-
RNBackgroundGeolocation.log('on', msg);
|
|
72
|
+
return RNBackgroundGeolocation.log('on', msg);
|
|
73
73
|
},
|
|
74
74
|
off: function(msg) {
|
|
75
|
-
RNBackgroundGeolocation.log('off', msg);
|
|
75
|
+
return RNBackgroundGeolocation.log('off', msg);
|
|
76
76
|
},
|
|
77
77
|
ok: function(msg) {
|
|
78
|
-
RNBackgroundGeolocation.log('ok', msg);
|
|
78
|
+
return RNBackgroundGeolocation.log('ok', msg);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -300,7 +300,6 @@ export default class NativeModule {
|
|
|
300
300
|
let watchId;
|
|
301
301
|
try {
|
|
302
302
|
watchId = await RNBackgroundGeolocation.watchPosition(options);
|
|
303
|
-
console.log("********** watchPositonId: ", watchId)
|
|
304
303
|
// Resolve with our wrapped Subscription instance.
|
|
305
304
|
resolve({
|
|
306
305
|
id: watchId,
|
|
@@ -391,6 +390,10 @@ export default class NativeModule {
|
|
|
391
390
|
* Logging & Debug Methods
|
|
392
391
|
*/
|
|
393
392
|
|
|
393
|
+
static log(level, message) {
|
|
394
|
+
return RNBackgroundGeolocation.log(level, message);
|
|
395
|
+
}
|
|
396
|
+
|
|
394
397
|
static setLogLevel(value) {
|
|
395
398
|
return RNBackgroundGeolocation.setLogLevel(value);
|
|
396
399
|
}
|
|
@@ -43,11 +43,11 @@ export interface Spec extends TurboModule {
|
|
|
43
43
|
destroyTransistorToken(url: string): Promise<void>;
|
|
44
44
|
|
|
45
45
|
// Logging
|
|
46
|
-
log(level: string, message: string): Promise<
|
|
46
|
+
log(level: string, message: string): Promise<boolean>;
|
|
47
47
|
getLog(query: Object): Promise<string>;
|
|
48
|
-
emailLog(email: string, query: Object): Promise<
|
|
49
|
-
uploadLog(url: string, query: Object): Promise<
|
|
50
|
-
destroyLog(): Promise<
|
|
48
|
+
emailLog(email: string, query: Object): Promise<boolean>;
|
|
49
|
+
uploadLog(url: string, query: Object): Promise<boolean>;
|
|
50
|
+
destroyLog(): Promise<boolean>;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export default TurboModuleRegistry.getEnforcing<Spec>('RNBackgroundGeolocation');
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
arguments=--init-script /var/folders/qk/r2r49k7527b6r81484vtk0g40000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/qk/r2r49k7527b6r81484vtk0g40000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
|
|
2
|
-
auto.sync=false
|
|
3
|
-
build.scans.enabled=false
|
|
4
|
-
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.9))
|
|
5
|
-
connection.project.dir=
|
|
6
|
-
eclipse.preferences.version=1
|
|
7
|
-
gradle.user.home=
|
|
8
|
-
java.home=/opt/homebrew/Cellar/openjdk@17/17.0.15/libexec/openjdk.jdk/Contents/Home
|
|
9
|
-
jvm.arguments=
|
|
10
|
-
offline.mode=false
|
|
11
|
-
override.workspace.settings=true
|
|
12
|
-
show.console.view=true
|
|
13
|
-
show.executions.view=true
|