Coming soon — we're finishing final tests before the public release. Explore the docs or check pricing in the meantime.

capacitor-bglocation
Capacitor 8 · iOS · Android

Background Location That Just Works

Production-ready Capacitor plugin for continuous GPS tracking on iOS and Android. Native HTTP posting, offline buffer, heartbeat timer — all in one package.

npm install capacitor-bglocation

300+

Unit Tests

2

Native Platforms

3,200+

Lines of Native Code

Source

Available (ELv2)

1.06:1

Test-to-Code Ratio

Everything You Need for Location Tracking

Built from scratch with Capacitor 8 native APIs. No wrappers, no legacy Cordova code — pure Kotlin and Swift.

Background GPS Tracking
Continuous location updates even when the app is in the background. CLLocationManager on iOS, FusedLocationProviderClient on Android.
Native HTTP Posting
Send locations directly from the native layer to your backend. No JavaScript wake-up needed.
Offline Buffer
SQLite-backed queue stores locations when offline. Automatic retry and FIFO flush when connectivity returns.
Heartbeat Timer
Periodic events even when stationary. Know your device is alive with configurable heartbeat intervals.
Adaptive Distance Filter
Auto-adjusts distance filter based on speed. Walk, bike, or drive — always optimal GPS usage and battery life.
Offline License Validation
RSA-2048 signed keys verified locally. No phone-home, no server dependency. Works fully offline.
SLC Fallback (iOS)
Significant Location Change watchdog auto-restarts GPS if iOS kills your app. Your tracking resumes silently.
Debug Mode
Verbose logs, onDebug events, optional system sounds. Dynamic Android notification with GPS counters.
Battery Optimization Detection
Detects OEM battery killers on Android with dontkillmyapp.com links. Warns when tracking may be interrupted.

Up and Running in Minutes

Install from npm, configure once, start tracking. Works with any Capacitor 8 app — Ionic, React, Vue, Angular.

import { BackgroundLocation } from 'capacitor-bglocation';

// 1. Configure
await BackgroundLocation.configure({
  distanceFilter: 15,
  desiredAccuracy: 'high',
  heartbeatInterval: 15,
  http: {
    url: 'https://api.example.com/location',
    headers: { Authorization: 'Bearer <token>' },
    buffer: { maxSize: 1000 },
  },
});

// 2. Listen
BackgroundLocation.addListener('onLocation', (loc) => {
  console.log(loc.latitude, loc.longitude);
});

// 3. Start
await BackgroundLocation.start();

How We Compare

Built for modern Capacitor apps, priced for indie developers.

Featurecapacitor-bglocationrecommendedtransistorsoft@capacitor/geolocation
Background GPS trackinglimited
Native HTTP posting
Offline buffer (SQLite)
Heartbeat timer
Adaptive distance filter
Capacitor 8 native
No Cordova legacy code
Battery optimization detection
Offline license (no phone-home)n/a
Source availableELv2MIT
Runs when app is killed
Geofencing
Single-app license$199/yr$299/yrFree
Company license$299/yr$499/yrFree

@capacitor/geolocation is the official Capacitor plugin — great for foreground location, but limited background support (no persistent tracking when the app is suspended/killed).

Ready to Ship Background Location?

Install and evaluate with trial mode — 30 min sessions, all features included. No license key needed to start.