react-native-background-location-pro-eval 0.0.0-stage → 1.0.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 +20 -0
- package/README.md +185 -2
- package/android/build.gradle +54 -0
- package/android/libs/bgtrackkit.aar +0 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/bglocationdemo/tracking/rn/BackgroundLocationProPackage.kt +20 -0
- package/ios/BgTrackKit.xcframework/Info.plist +44 -0
- package/ios/BgTrackKit.xcframework/ios-arm64/BgTrackKit.framework/BgTrackKit +0 -0
- package/ios/BgTrackKit.xcframework/ios-arm64/BgTrackKit.framework/Headers/BgTrackKit-Swift.h +430 -0
- package/ios/BgTrackKit.xcframework/ios-arm64/BgTrackKit.framework/Info.plist +0 -0
- package/ios/BgTrackKit.xcframework/ios-arm64/BgTrackKit.framework/Modules/module.modulemap +5 -0
- package/ios/BgTrackKit.xcframework/ios-arm64_x86_64-simulator/BgTrackKit.framework/BgTrackKit +0 -0
- package/ios/BgTrackKit.xcframework/ios-arm64_x86_64-simulator/BgTrackKit.framework/Headers/BgTrackKit-Swift.h +856 -0
- package/ios/BgTrackKit.xcframework/ios-arm64_x86_64-simulator/BgTrackKit.framework/Info.plist +0 -0
- package/ios/BgTrackKit.xcframework/ios-arm64_x86_64-simulator/BgTrackKit.framework/Modules/module.modulemap +5 -0
- package/ios/BgTrackKit.xcframework/ios-arm64_x86_64-simulator/BgTrackKit.framework/_CodeSignature/CodeResources +101 -0
- package/ios/BgTrackShim.m +31 -0
- package/ios/RCTLocationTracker.h +12 -0
- package/ios/RCTLocationTracker.mm +100 -0
- package/package.json +82 -4
- package/react-native-background-location-pro-eval.podspec +25 -0
- package/react-native.config.js +10 -0
- package/src/index.ts +8 -0
- package/src/specs/NativeLocationTracker.ts +126 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Commercial Evaluation License
|
|
2
|
+
Copyright (c) Punith M. All rights reserved.
|
|
3
|
+
|
|
4
|
+
This package (the "Software") is distributed as a free evaluation build of
|
|
5
|
+
React Native Background Location Pro.
|
|
6
|
+
|
|
7
|
+
1. Evaluation grant. You may install and run the Software, free of charge, solely
|
|
8
|
+
to evaluate it in development builds of your application. The Software does not
|
|
9
|
+
track in production or distributed builds.
|
|
10
|
+
|
|
11
|
+
2. Restrictions. You may not redistribute, sublicense, resell, publish, decompile,
|
|
12
|
+
disassemble, reverse engineer, or otherwise attempt to derive the source of the
|
|
13
|
+
compiled components, nor remove or circumvent the evaluation gate.
|
|
14
|
+
|
|
15
|
+
3. Unlocking. A separate commercial license grants access to the full, unrestricted
|
|
16
|
+
source repositories. See the README for how to purchase.
|
|
17
|
+
|
|
18
|
+
4. No warranty. The Software is provided "AS IS", without warranty of any kind,
|
|
19
|
+
express or implied. In no event shall the author be liable for any claim, damages,
|
|
20
|
+
or other liability arising from the use of the Software.
|
package/README.md
CHANGED
|
@@ -1,3 +1,186 @@
|
|
|
1
|
-
#
|
|
1
|
+
# React Native Background Location Pro (free evaluation)
|
|
2
|
+
|
|
3
|
+
**Production-grade background location tracking for React Native that survives app kills, reboots, and offline periods, with no third-party tracking SDKs.**
|
|
4
|
+
|
|
5
|
+
Try the complete native pipeline free in your own app, on your own routes. When you are ready to ship, a one-time license gets you the full source.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/react-native-background-location-pro-eval)
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 👋 From the creator of react-native-pdf-jsi
|
|
19
|
+
|
|
20
|
+
I'm Punith Manthri, the author of [**react-native-pdf-jsi**](https://www.npmjs.com/package/react-native-pdf-jsi), the open-source JSI-accelerated PDF viewer for React Native. It has crossed **300k+ downloads on npm** and is used in production apps around the world.
|
|
21
|
+
|
|
22
|
+
[](https://www.npmjs.com/package/react-native-pdf-jsi)
|
|
23
|
+
[](https://www.npmjs.com/package/react-native-pdf-jsi)
|
|
24
|
+
[](https://www.npmjs.com/package/react-native-pdf-jsi)
|
|
25
|
+
[](https://github.com/126punith/react-native-pdf-jsi)
|
|
26
|
+
|
|
27
|
+
Background Location Pro is built with the same focus: native performance, New Architecture first, and code you can trust in production.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🎬 Demo
|
|
32
|
+
|
|
33
|
+
Both platforms use the same JS API and the same ingestion server, so the live map looks identical.
|
|
34
|
+
|
|
35
|
+
<table>
|
|
36
|
+
<tr>
|
|
37
|
+
<td width="50%" align="center">
|
|
38
|
+
|
|
39
|
+
**Android**: Kotlin foreground service
|
|
40
|
+
|
|
41
|
+
<a href="https://github.com/126punith/react-native-background-location-pro/blob/main/assets/demo.mp4">
|
|
42
|
+
<img src="https://raw.githubusercontent.com/126punith/react-native-background-location-pro/main/assets/demo-preview.gif" alt="Android background location tracking demo" width="320" />
|
|
43
|
+
</a>
|
|
44
|
+
|
|
45
|
+
[Watch the Android demo (MP4)](https://github.com/126punith/react-native-background-location-pro/blob/main/assets/demo.mp4)
|
|
46
|
+
|
|
47
|
+
</td>
|
|
48
|
+
<td width="50%" align="center">
|
|
49
|
+
|
|
50
|
+
**iOS**: Swift `CLLocationManager`
|
|
51
|
+
|
|
52
|
+
<a href="https://github.com/126punith/react-native-background-location-pro/blob/main/assets/demo-ios.mp4">
|
|
53
|
+
<img src="https://raw.githubusercontent.com/126punith/react-native-background-location-pro/main/assets/demo-ios-preview.gif" alt="iOS background location tracking demo" width="320" />
|
|
54
|
+
</a>
|
|
55
|
+
|
|
56
|
+
[Watch the iOS demo (MP4)](https://github.com/126punith/react-native-background-location-pro/blob/main/assets/demo-ios.mp4)
|
|
57
|
+
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</table>
|
|
61
|
+
|
|
62
|
+
In the demo, tracking starts in the foreground, then the app is backgrounded and its process is killed by the system. Points keep landing on the live map, and the offline queue drains on reconnect.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## ✅ Try it free
|
|
67
|
+
|
|
68
|
+
The evaluation build runs the full native pipeline:
|
|
69
|
+
|
|
70
|
+
- **The complete iOS pipeline**: `CLLocationManager` capture with displacement and teleport filtering, SQLite buffering with idempotent batch sync, a CoreMotion low-power gate, and a watchdog built on significant-change relaunch and `BGAppRefreshTask`.
|
|
71
|
+
- **Three tracking profiles** (`continuous_fitness`, `adaptive_low_power`, `balanced`), switchable live with one line of JS.
|
|
72
|
+
- **Zero app wiring**: no `AppDelegate` edits and no module registration.
|
|
73
|
+
|
|
74
|
+
It runs fully in your development builds. Production and store builds report `buildTier: 'release'` and tracking stays off until you [license the source](#-get-access).
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
npm i react-native-background-location-pro-eval
|
|
80
|
+
cd ios && pod install
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Use
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import LocationTracker from 'react-native-background-location-pro-eval';
|
|
87
|
+
|
|
88
|
+
LocationTracker.startTracking('http://localhost:3000');
|
|
89
|
+
const status = LocationTracker.getStatus();
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Your app needs the `Info.plist` keys `UIBackgroundModes`, `BGTaskSchedulerPermittedIdentifiers`, and the location and motion usage strings. The paid editions ship a complete setup guide, a backend ingestion server, and a live map.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 💎 What you get with a license
|
|
97
|
+
|
|
98
|
+
Every edition includes:
|
|
99
|
+
|
|
100
|
+
- **Full native source code**, yours to modify, with no third-party tracking SDKs
|
|
101
|
+
- The React Native JS API (typed TurboModule spec) and a ready-to-use live dashboard screen
|
|
102
|
+
- Three tracking profiles with the native motion gate
|
|
103
|
+
- **Bulletproof native sync**: classified retries, `Retry-After`, jitter, a dead-letter queue, and retry state that survives process death
|
|
104
|
+
- **Store approval blueprint** for your platform: manifest, `Info.plist` and privacy-manifest templates, disclosure text and reviewer notes
|
|
105
|
+
- A backend ingestion server with a real-time live map, and fault injection for testing retries
|
|
106
|
+
- A setup and run guide
|
|
107
|
+
- **Lifetime updates** to the repositories you bought
|
|
108
|
+
|
|
109
|
+
| Edition | Native code | Private repository access |
|
|
110
|
+
| --- | --- | --- |
|
|
111
|
+
| **Android Edition** | Complete Android tracking module (Kotlin, New Architecture) | Android repository |
|
|
112
|
+
| **iOS Edition** | Complete iOS tracking module (Swift + Objective-C++ TurboModule) | iOS repository |
|
|
113
|
+
| **Best Value Edition** | Both modules | Both repositories |
|
|
114
|
+
|
|
115
|
+
Want the tested scenarios and the comparison with other tracking libraries? See the [full product page](https://github.com/126punith/react-native-background-location-pro#readme).
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 🚀 Get access
|
|
120
|
+
|
|
121
|
+
Pay once, no subscription. Pick an edition, then the payment option that matches your location.
|
|
122
|
+
|
|
123
|
+
| Edition | What you get | USD (GitHub Sponsors) | INR (UPI) |
|
|
124
|
+
| --- | --- | --- | --- |
|
|
125
|
+
| **Android Edition** | Android module + JS API + server | **$39** | **₹3,000** |
|
|
126
|
+
| **iOS Edition** | iOS module + JS API + server | **$59** | **₹5,000** |
|
|
127
|
+
| **Best Value Edition** ⭐ | Android + iOS, both repositories | **$89** (save $9) | **₹7,000** (save ₹1,000) |
|
|
128
|
+
|
|
129
|
+
### 🌎 Option A: International developers (outside India), via GitHub Sponsors
|
|
130
|
+
|
|
131
|
+
Pay securely through GitHub Sponsors with any credit card, debit card, or PayPal.
|
|
132
|
+
|
|
133
|
+
👉 **[Sponsor on GitHub (one-time)](https://github.com/sponsors/126punith)**
|
|
134
|
+
|
|
135
|
+
> **Important:** choose the **One-time** tab and select the tier for your edition: **$39** (Android), **$59** (iOS), or **$89** (Best Value). Do **not** pick a monthly sponsorship. This is a single payment, not a subscription.
|
|
136
|
+
|
|
137
|
+
**How access works**
|
|
138
|
+
|
|
139
|
+
1. Open the link above, switch to **One-time**, and complete the sponsorship for your edition.
|
|
140
|
+
2. I personally confirm that your sponsorship and payment have come through.
|
|
141
|
+
3. I then add your GitHub account as a collaborator to the repository (or both repositories for Best Value) that matches your tier, usually within 24 hours.
|
|
142
|
+
4. Accept the invite from your email or from [github.com/notifications](https://github.com/notifications).
|
|
143
|
+
|
|
144
|
+
*No need to send your username, because GitHub shows me which account sponsored and which tier. If you sponsored from a different account than the one you want access on, email [punithm300@gmail.com](mailto:punithm300@gmail.com).*
|
|
145
|
+
|
|
146
|
+
### 🇮🇳 Option B: Indian developers (UPI / GPay)
|
|
147
|
+
|
|
148
|
+
Pay directly via UPI: **₹3,000** (Android), **₹5,000** (iOS), or **₹7,000** (Best Value).
|
|
149
|
+
|
|
150
|
+
1. Scan the QR code below with any UPI app (GPay, PhonePe, Paytm).
|
|
151
|
+
2. Enter the amount for your edition and make a one-time payment.
|
|
152
|
+
3. Email a screenshot of the successful payment, the **edition** you bought, and your **GitHub username** to **[punithm300@gmail.com](mailto:punithm300@gmail.com)**.
|
|
153
|
+
4. You'll be added as a collaborator to the matching private repository (or both for Best Value) after the payment is verified.
|
|
154
|
+
|
|
155
|
+
<p align="center">
|
|
156
|
+
<img src="https://raw.githubusercontent.com/126punith/react-native-background-location-pro/main/assets/upi-qr.jpeg" alt="GPay / UPI QR code" width="260" />
|
|
157
|
+
</p>
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## FAQ
|
|
162
|
+
|
|
163
|
+
**Is this a subscription?**
|
|
164
|
+
No. Every edition is a one-time payment with lifetime access to its repository and updates. On GitHub Sponsors, make sure you pick the one-time tier ($39, $59, or $89), not a monthly one.
|
|
165
|
+
|
|
166
|
+
**Which edition should I buy?**
|
|
167
|
+
Buy the Android or iOS Edition if your app ships on one platform. If you ship on both, the Best Value Edition costs less than buying the two separately.
|
|
168
|
+
|
|
169
|
+
**Can I use it in commercial apps?**
|
|
170
|
+
Yes, with a license. You can use the source in personal and commercial projects.
|
|
171
|
+
|
|
172
|
+
**I paid but haven't got access yet.**
|
|
173
|
+
Email [punithm300@gmail.com](mailto:punithm300@gmail.com) with your GitHub username, the edition you bought, and a Sponsors receipt or UPI screenshot.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
This evaluation build is covered by the [evaluation license](LICENSE). The paid editions are covered by the commercial source license on the [product page](https://github.com/126punith/react-native-background-location-pro#license).
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Topics
|
|
184
|
+
|
|
185
|
+
`react-native` · `background-location` · `location-tracking` · `geolocation` · `gps-tracking` · `background-tracking` · `background-service` · `background-tasks` · `turbomodule` · `new-architecture` · `jsi` · `react-native-module` · `ios` · `android` · `swift` · `kotlin` · `offline-first` · `fleet-tracking` · `mobile-development` · `npm-package`
|
|
2
186
|
|
|
3
|
-
This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Thin autolinked module: the engine and bridge ship precompiled in libs/bgtrackkit.aar. The only
|
|
2
|
+
// source here is the package stub autolinking needs to discover the module; the TurboModule spec
|
|
3
|
+
// is generated by the React Native Gradle plugin from ../package.json's codegenConfig.
|
|
4
|
+
|
|
5
|
+
apply plugin: "com.android.library"
|
|
6
|
+
|
|
7
|
+
// AGP 9 compiles Kotlin itself unless android.builtInKotlin=false; applying kotlin-android on top fails.
|
|
8
|
+
def needsKotlinPlugin() {
|
|
9
|
+
def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
|
|
10
|
+
if (agpMajor <= 8) return true
|
|
11
|
+
def builtIn = providers.gradleProperty("android.builtInKotlin").orNull
|
|
12
|
+
return builtIn != null && !builtIn.toBoolean()
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (needsKotlinPlugin()) {
|
|
16
|
+
apply plugin: "org.jetbrains.kotlin.android"
|
|
17
|
+
}
|
|
18
|
+
apply plugin: "com.facebook.react"
|
|
19
|
+
|
|
20
|
+
def safeExtGet(prop, fallback) {
|
|
21
|
+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
android {
|
|
25
|
+
namespace "com.bglocationdemo.tracking.rn"
|
|
26
|
+
compileSdk safeExtGet("compileSdkVersion", 36)
|
|
27
|
+
|
|
28
|
+
defaultConfig {
|
|
29
|
+
minSdk safeExtGet("minSdkVersion", 24)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
compileOptions {
|
|
33
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
34
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
kotlin {
|
|
39
|
+
compilerOptions {
|
|
40
|
+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
dependencies {
|
|
45
|
+
implementation("com.facebook.react:react-android")
|
|
46
|
+
api(files("libs/bgtrackkit.aar"))
|
|
47
|
+
|
|
48
|
+
// A local AAR carries no POM, so the engine's runtime dependencies are declared here.
|
|
49
|
+
implementation("com.google.android.gms:play-services-location:21.3.0")
|
|
50
|
+
implementation("androidx.room:room-runtime:2.7.2")
|
|
51
|
+
implementation("androidx.room:room-ktx:2.7.2")
|
|
52
|
+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
|
|
53
|
+
implementation("androidx.core:core-ktx:1.16.0")
|
|
54
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<manifest />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
package com.bglocationdemo.tracking.rn
|
|
2
|
+
|
|
3
|
+
import com.bglocationdemo.tracking.bridge.LocationBridgePackage
|
|
4
|
+
import com.facebook.react.BaseReactPackage
|
|
5
|
+
import com.facebook.react.bridge.NativeModule
|
|
6
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
7
|
+
import com.facebook.react.module.model.ReactModuleInfoProvider
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Autolinking only discovers packages declared in source, so this delegates to the precompiled
|
|
11
|
+
* [LocationBridgePackage] inside bgtrackkit.aar.
|
|
12
|
+
*/
|
|
13
|
+
class BackgroundLocationProPackage : BaseReactPackage() {
|
|
14
|
+
private val delegate = LocationBridgePackage()
|
|
15
|
+
|
|
16
|
+
override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? =
|
|
17
|
+
delegate.getModule(name, reactContext)
|
|
18
|
+
|
|
19
|
+
override fun getReactModuleInfoProvider(): ReactModuleInfoProvider = delegate.getReactModuleInfoProvider()
|
|
20
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>AvailableLibraries</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>BinaryPath</key>
|
|
9
|
+
<string>BgTrackKit.framework/BgTrackKit</string>
|
|
10
|
+
<key>LibraryIdentifier</key>
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
|
+
<key>LibraryPath</key>
|
|
13
|
+
<string>BgTrackKit.framework</string>
|
|
14
|
+
<key>SupportedArchitectures</key>
|
|
15
|
+
<array>
|
|
16
|
+
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
18
|
+
</array>
|
|
19
|
+
<key>SupportedPlatform</key>
|
|
20
|
+
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
23
|
+
</dict>
|
|
24
|
+
<dict>
|
|
25
|
+
<key>BinaryPath</key>
|
|
26
|
+
<string>BgTrackKit.framework/BgTrackKit</string>
|
|
27
|
+
<key>LibraryIdentifier</key>
|
|
28
|
+
<string>ios-arm64</string>
|
|
29
|
+
<key>LibraryPath</key>
|
|
30
|
+
<string>BgTrackKit.framework</string>
|
|
31
|
+
<key>SupportedArchitectures</key>
|
|
32
|
+
<array>
|
|
33
|
+
<string>arm64</string>
|
|
34
|
+
</array>
|
|
35
|
+
<key>SupportedPlatform</key>
|
|
36
|
+
<string>ios</string>
|
|
37
|
+
</dict>
|
|
38
|
+
</array>
|
|
39
|
+
<key>CFBundlePackageType</key>
|
|
40
|
+
<string>XFWK</string>
|
|
41
|
+
<key>XCFrameworkFormatVersion</key>
|
|
42
|
+
<string>1.0</string>
|
|
43
|
+
</dict>
|
|
44
|
+
</plist>
|