Skip to main content

Background tracking

By default, the Adtrace SDK pauses sending network requests while your app is in the background. You can enable background tracking so the SDK continues to send requests when the app is not in the foreground.

Set this option on your AdTraceConfig instance before you call AdTrace.onCreate(). See Configuration for how to create the config.

Method signature

public void setSendInBackground(boolean sendInBackground)
ParameterTypeDescription
sendInBackgroundbooleanSet true to send requests while the app is in the background. Set false to pause sending in the background (default).

Enable background tracking

Call setSendInBackground(true) on your AdTraceConfig instance.

Example

config.setSendInBackground(true);