On Android, Connecthings’ SDK allows you to easily manage the Bluetooth scanning process for your app.

With in-app actions, high scanning frequency is recommended to ensure quick zone detection. Our SDK launches a foreground scan every second.

With the scanning process for notifications, however, you must find a right balance between rapid zone detection, and battery impact limitation.

To do this, Herow and our SDK feature a Background Scanning parameters. You can manage this setting directly in the platform.

The scanning Strategy

This is the default configuration in our SDK:

  • When the application is active/running in the foreground, the SDK does an active Bluetooth scan, with a high scanning period
  • When the application is running in the background or is closed, the SDK does a smart Bluetooth scan, with a lower scanning period

You can play with two background scanning parameters to manage battery consumption:

  • The Scanning Duration: the length of the SDK scanning periods
  • The Scanning Interval: the time lapse between two SDK Bluetooth scans

To optimize zone detection and the notification process, we recommend setting the Scanning Interval to 12-60 seconds and the Scanning Duration to 6-12 seconds.

With this algorithm, when the application is running in the background, the SDK is actively scanning about 50% of the time. Constant scanning is not appropriate as it would drain users' battery.

The final values that you choose depend on your app, and the type of zone interactions you want to implement.

Note:

Our Default configuration comes with the following background scanning values:

  • Scanning Interval: 6'
  • Scanning Duration: 18'

Configuring your Background Scanning Parameters

You can configure your Background Scanning Parameters directly on Herow, by navigating to the Specific Android Behaviour tab of the App Settings section.