<p align="center">
  <img src="https://raw.githubusercontent.com/transistorsoft/assets/master/images/logos/transistor/transistor-logo-panel-all.svg" alt="Background Geolocation for Cordova" width="635">
</p>

# Background Geolocation for Cordova

[![npm](https://img.shields.io/npm/dm/cordova-background-geolocation-lt.svg)]() [![npm](https://img.shields.io/npm/v/cordova-background-geolocation-lt.svg)]()

The most sophisticated background **location-tracking & geofencing** SDK with battery-conscious motion-detection intelligence for **iOS** and **Android**.

The SDK uses **motion-detection** APIs (accelerometer, gyroscope, magnetometer) to detect when the device is *moving* or *stationary*:

- **Moving** — location recording starts automatically at the configured `distanceFilter` (metres)
- **Stationary** — location services turn off automatically to conserve battery

> [!IMPORTANT]
> This is **`v5`**. For the previous version see [`v4.x`](https://github.com/transistorsoft/cordova-background-geolocation-lt/tree/4.18.2). **`v4.x`** license keys do **not** work with **`v5`** — log in to the [Customer Dashboard](https://transistorsoft.com) to generate a **`v5`** key. See the [Migration Guide](help/MIGRATION-GUIDE-v5.md) for details.

---

## :books: Documentation

### <img src="https://raw.githubusercontent.com/transistorsoft/react-native-background-geolocation/master/assets/images/platforms/cordova.svg" width="20" height="20"> Cordova
- [Setup](https://docs.transistorsoft.com/cordova/setup/)
- [API Reference](https://docs.transistorsoft.com/cordova/BackgroundGeolocation/)
- [Example](https://docs.transistorsoft.com/cordova/examples/)

---

## :key: Licensing

> [!TIP]
> The SDK is **fully functional in `DEBUG` builds** — no license required. Try before you buy.

A license is required only for **`RELEASE` builds** on Android.
[Purchase a license](https://docs.transistorsoft.com)

---

## :open_file_folder: Example Apps

See [`example/`](./example) — an Ionic/Angular example app is included in this repo.

---

## 📦 SDK availability

| Platform | Package |
|---|---|
| <img src="https://raw.githubusercontent.com/transistorsoft/react-native-background-geolocation/master/assets/images/platforms/cordova.svg" width="16" height="16"> Cordova | **This repo** |
| <img src="https://raw.githubusercontent.com/transistorsoft/react-native-background-geolocation/master/assets/images/platforms/react-native.svg" width="16" height="16"> [React Native](https://github.com/transistorsoft/react-native-background-geolocation) | `react-native-background-geolocation` |
| <img src="https://raw.githubusercontent.com/transistorsoft/react-native-background-geolocation/master/assets/images/platforms/expo.svg" width="16" height="16"> [Expo](https://github.com/transistorsoft/react-native-background-geolocation) | `react-native-background-geolocation` |
| <img src="https://raw.githubusercontent.com/transistorsoft/react-native-background-geolocation/master/assets/images/platforms/flutter.svg" width="16" height="16"> [Flutter](https://github.com/transistorsoft/flutter_background_geolocation) | `flutter_background_geolocation` |
| <img src="https://raw.githubusercontent.com/transistorsoft/react-native-background-geolocation/master/assets/images/platforms/capacitor.svg" width="16" height="16"> [Capacitor](https://github.com/transistorsoft/capacitor-background-geolocation) | `@transistorsoft/capacitor-background-geolocation` |
| <img src="https://raw.githubusercontent.com/transistorsoft/react-native-background-geolocation/master/assets/images/platforms/swift.svg" width="16" height="16"> [Swift / iOS](https://github.com/transistorsoft/native-background-geolocation) | `background-geolocation` |
| <img src="https://raw.githubusercontent.com/transistorsoft/react-native-background-geolocation/master/assets/images/platforms/kotlin.svg" width="16" height="16"> [Kotlin / Android](https://github.com/transistorsoft/native-background-geolocation) | `background-geolocation` |

---

MIT © [Transistor Software](https://www.transistorsoft.com)
