Licensing
The plugin uses a perpetual license model with offline RSA-2048 validation. During evaluation you get 30-minute trial sessions — no credit card required.
Trial Mode
Without a license key the plugin runs in trial mode automatically:
- 30-minute sessions — tracking stops automatically and fires an
onTrialExpiredevent. - 1-hour cooldown — you must wait before starting a new trial session.
- Debug forced on — verbose logs are enabled so you can inspect behavior.
- Full feature access — HTTP posting, geofencing, adaptive filter — everything works.
addListener('onTrialExpired', (event) => {
console.log('Trial ended at', new Date(event.timestamp));
// Tracking has been stopped automatically.
// Next trial available after 1-hour cooldown.
});Adding a License Key
Expo users configure via the plugin array. Bare React Native projects set the key in native config files.
// app.json
{
"expo": {
"plugins": [
[
"@bglocation/react-native",
{
"licenseKey": "BGL1-eyJ..."
}
]
]
}
}Bare React Native (no Expo):
<!-- iOS: Info.plist --> <key>BGLocationLicenseKey</key> <string>BGL1-eyJ...</string> <!-- Android: AndroidManifest.xml --> <meta-data android:name="dev.bglocation.LICENSE_KEY" android:value="BGL1-eyJ..." />
How Validation Works
- RSA-2048 signed payloads verified fully offline on-device.
- No network calls, no license server — your app works in airplane mode.
- License bound to your app's bundle identifier (e.g.
com.yourcompany.app). - Works across both Capacitor and React Native wrappers for the same bundle ID.
Perpetual License Model
What You Get
- Perpetual right to use the purchased version
- 1 year of updates included
- All features, all platforms
After Year One
- Keep using your current version forever
- Optionally renew for another year of updates
- No forced upgrades, no tracking cutoff
Checking License Status
The configure() result includes license information:
const result = await configure({ ... });
console.log(result.licenseMode); // 'full' | 'trial'
console.log(result.licenseUpdatesUntil); // '2026-01-15' (if licensed)
console.log(result.licenseUpdateExpired); // true if updates expired
console.log(result.licenseError); // string if validation failedConfigureResult Interface
| Property | Type | Description |
|---|---|---|
licenseMode | 'full' | 'trial' | Current license mode. |
licenseUpdatesUntil | string? | ISO date until updates are available. |
licenseUpdateExpired | boolean? | True if plugin version exceeds update window. |
licenseError | string? | Validation error message (bundle mismatch, corrupted key, etc.). |