Version 3 of the Background Geolocation SDK for Cordova, React Native and Flutter (v1) is a significant refactor of the SDK’s Android Service architecture.

The Foreground Service

In the past, when BackgroundGeolocation.start() was executed, the Android SDK would launch a foreground-service (along with its required persistent notification). The foreground-service would remain running with its persistent notification until BackgroundGeolocation.stop() was executed.

Android Significant Location Changes

In the past, only the iOS SDK implemented the option useSignificantChangesOnly. iOS has a built-in option for its Location API called Significant Location Changes” (SLC). Engaging the SLC option with useSignificantChangesOnly: true, your app will be provided only periodic location updates, typically every 500–1000 meters but significantly less power will be consumed.

useSignificantChangesOnly: true
useSignificantChangesOnly: false (default)

Android Custom Notification Layouts

In December, 2018, we received a feature-request to be able to add custom buttons to the Android SDK’s foreground-service notification.

Android background-tasks

Before v3 (v1 for Flutter), only the iOS SDK had an implementation for startBackgroundTask. An iOS “background-task” is a signal to the OS that the app wants to perform a long-running task while the app is in the background, an HTTP request for example. Typically, when an iOS app moves to the background, the OS immediately suspends the app (unless a Background Mode, such as location-updates, is engaged). An iOS background-task provides an app exactly 180 seconds of running-time before the app will be forcibly suspended.

Creator of Background Geolocation SDK. Professional plugin developers — geolocation specialists.