react-native-background-geolocation 5.0.1 → 5.0.2
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.
|
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
|
|
|
27
27
|
s.preserve_paths = 'docs', 'CHANGELOG.md', 'LICENSE', 'package.json', 'RNBackgroundGeolocation.ios.js'
|
|
28
28
|
|
|
29
29
|
s.dependency 'CocoaLumberjack', '~> 3.8.5'
|
|
30
|
-
s.dependency 'TSLocationManager', '~> 4.0.
|
|
30
|
+
s.dependency 'TSLocationManager', '~> 4.0.10'
|
|
31
31
|
|
|
32
32
|
s.libraries = 'sqlite3', 'z', 'stdc++'
|
|
33
33
|
s.resource_bundles = {
|
package/android/build.gradle
CHANGED
|
@@ -4,8 +4,8 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
// Android dependencies
|
|
7
|
-
def DEFAULT_COMPILE_SDK_VERSION =
|
|
8
|
-
def DEFAULT_TARGET_SDK_VERSION =
|
|
7
|
+
def DEFAULT_COMPILE_SDK_VERSION = 35
|
|
8
|
+
def DEFAULT_TARGET_SDK_VERSION = 35
|
|
9
9
|
|
|
10
10
|
// Plugin dependencies
|
|
11
11
|
def DEFAULT_PLAY_SERVICES_LOCATION_VERSION = "21.3.0"
|
|
@@ -326,18 +326,13 @@ public class RNBackgroundGeolocationModule
|
|
|
326
326
|
|
|
327
327
|
@Override
|
|
328
328
|
public void onHostPause() {
|
|
329
|
-
|
|
330
|
-
TSConfig config = TSConfig.getInstance(context);
|
|
331
|
-
if (config.getEnabled()) {
|
|
332
|
-
TSScheduleManager.getInstance(context).oneShot(TerminateEvent.ACTION, 10000);
|
|
333
|
-
}
|
|
329
|
+
|
|
334
330
|
}
|
|
335
331
|
@Override
|
|
336
332
|
public void onHostDestroy() {
|
|
337
333
|
mInitialized = false;
|
|
338
334
|
mReady = false;
|
|
339
335
|
removeAllListeners();
|
|
340
|
-
getAdapter().onActivityDestroy();
|
|
341
336
|
}
|
|
342
337
|
|
|
343
338
|
@Override
|
|
@@ -1017,8 +1012,7 @@ public class RNBackgroundGeolocationModule
|
|
|
1017
1012
|
private void removeAllListeners() {
|
|
1018
1013
|
synchronized (mListeners) {
|
|
1019
1014
|
mListeners.clear();
|
|
1020
|
-
}
|
|
1021
|
-
getAdapter().removeListeners();
|
|
1015
|
+
}
|
|
1022
1016
|
}
|
|
1023
1017
|
|
|
1024
1018
|
private void onLocationError(Integer code) {
|
|
@@ -1274,11 +1268,5 @@ public class RNBackgroundGeolocationModule
|
|
|
1274
1268
|
|
|
1275
1269
|
private BackgroundGeolocation getAdapter() {
|
|
1276
1270
|
return BackgroundGeolocation.getInstance(getReactApplicationContext());
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
@Override
|
|
1280
|
-
public void onCatalystInstanceDestroy() {
|
|
1281
|
-
mInitialized = false;
|
|
1282
|
-
removeAllListeners();
|
|
1283
|
-
}
|
|
1271
|
+
}
|
|
1284
1272
|
}
|
|
@@ -363,7 +363,7 @@ RCT_EXPORT_METHOD(getCurrentPosition:(NSDictionary*)options resolve:(RCTPromiseR
|
|
|
363
363
|
RCT_EXPORT_METHOD(watchPosition:(NSDictionary*)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)
|
|
364
364
|
{
|
|
365
365
|
TSWatchPositionRequest *request = [TSWatchPositionRequest requestWithSuccess:^(TSLocationStreamEvent *event) {
|
|
366
|
-
[self sendEvent:EVENT_WATCHPOSITION body:[event toDictionary]];
|
|
366
|
+
[self sendEvent:EVENT_WATCHPOSITION body:[event.locationEvent toDictionary]];
|
|
367
367
|
} failure:^(NSError *error) {
|
|
368
368
|
// No reject; stream API
|
|
369
369
|
}];
|
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.2",
|
|
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",
|