react-native-background-geolocation 5.4.0 → 5.5.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.
package/README.md
CHANGED
|
@@ -36,9 +36,11 @@ The SDK uses **motion-detection** APIs (accelerometer, gyroscope, magnetometer)
|
|
|
36
36
|
|
|
37
37
|
> [!TIP]
|
|
38
38
|
> The SDK is **fully functional in `DEBUG` builds** — no license required. Try before you buy.
|
|
39
|
+
>
|
|
40
|
+
> Need to test a `RELEASE` build? [Generate a free 30-day trial license](https://transistorsoft.com/shop/trials/new).
|
|
39
41
|
|
|
40
|
-
A license is required
|
|
41
|
-
[Purchase a license](https://docs.transistorsoft.com)
|
|
42
|
+
A license is required for **`RELEASE` builds** on both iOS and Android.
|
|
43
|
+
[Purchase a license](https://docs.transistorsoft.com/purchase/?platform=react-native)
|
|
42
44
|
|
|
43
45
|
---
|
|
44
46
|
|
|
@@ -26,7 +26,7 @@ Pod::Spec.new do |s|
|
|
|
26
26
|
s.source_files = 'ios/RNBackgroundGeolocation/*.{h,m,mm}'
|
|
27
27
|
s.preserve_paths = 'docs', 'CHANGELOG.md', 'LICENSE', 'package.json', 'RNBackgroundGeolocation.ios.js'
|
|
28
28
|
|
|
29
|
-
tslm_version = ENV['TSLOCATIONMANAGER_VERSION'] || '~> 4.
|
|
29
|
+
tslm_version = ENV['TSLOCATIONMANAGER_VERSION'] || '~> 4.5.0'
|
|
30
30
|
s.dependency 'TSLocationManager', tslm_version
|
|
31
31
|
|
|
32
32
|
s.libraries = 'sqlite3', 'z', 'stdc++'
|
package/android/build.gradle
CHANGED
|
@@ -9,7 +9,7 @@ def DEFAULT_TARGET_SDK_VERSION = 35
|
|
|
9
9
|
|
|
10
10
|
// Plugin dependencies
|
|
11
11
|
def DEFAULT_PLAY_SERVICES_LOCATION_VERSION = "21.3.0"
|
|
12
|
-
def DEFAULT_TSLOCATIONMANAGER_VERSION = "4.
|
|
12
|
+
def DEFAULT_TSLOCATIONMANAGER_VERSION = "4.5.+"
|
|
13
13
|
def DEFAULT_OK_HTTP_VERSION = "4.12.0"
|
|
14
14
|
def DEFAULT_ANDROID_PERMISSIONS_VERSION = "2.1.6"
|
|
15
15
|
def DEFAULT_EVENTBUS_VERSION = "3.3.1"
|
package/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTaskManager.java
CHANGED
|
@@ -102,10 +102,18 @@ public class HeadlessTaskManager implements HeadlessJsTaskEventListener {
|
|
|
102
102
|
|
|
103
103
|
addTask(task);
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
// Re-resolve the *live* ReactContext rather than trusting the sticky
|
|
106
|
+
// mIsReactContextInitialized flag (never reset on teardown). On the New
|
|
107
|
+
// Architecture the headless ReactContext is torn down after a task finishes,
|
|
108
|
+
// so getReactContext() returns null while the flag stays true; passing that
|
|
109
|
+
// null to HeadlessJsTaskContext.getInstance(@NonNull) throws an NPE and drops
|
|
110
|
+
// the event. Mirrors react-native-background-fetch's null-guard.
|
|
111
|
+
ReactContext reactContext = mIsReactContextInitialized.get() ? getReactContext(context) : null;
|
|
112
|
+
if (reactContext == null) {
|
|
113
|
+
mIsReactContextInitialized.set(false);
|
|
106
114
|
createReactContextAndScheduleTask(context);
|
|
107
115
|
} else {
|
|
108
|
-
boolean success = invokeStartTask(
|
|
116
|
+
boolean success = invokeStartTask(reactContext, task);
|
|
109
117
|
if (!success) {
|
|
110
118
|
removeTask(task);
|
|
111
119
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
|
|
3
3
|
"name": "react-native-background-geolocation",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.5.0",
|
|
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",
|