The SDK uses WorkManager to schedule and send cached tracking data (requests) at periodic times (Config.requestInterval) in the background. WorkManager guarantees an execution, even if your app is terminated. Another advantage is that the device battery is conserved while improving overall performance.

You can adjust the WorkManager restrictions according to your needs.


class SampleApplication : Application() {
     override fun onCreate() {
         super .onCreate()
         val constraints = Constraints.Builder()
             .setRequiresBatteryNotLow( true )
         val webtrekkConfigurations =
             WebtrekkConfiguration.Builder(listOf( "111111111111111" ), "" )
                 .workManagerConstraints(constraints = constraints)
         Webtrekk.getInstance().init( this , webtrekkConfigurations)
public class SampleApplication extends Application() {
     public void onCreate(){
         super .onCreate();
         Constraints constraints = new Constraints.Builder()
             .setRequiresCharging( true )
             .setRequiresBatteryNotLow( true )
         List<String> trackIds = new ArrayList<>();
         trackIds.add( "111111111111111" );
         WebtrekkConfiguration webtrekkConfiguration = new WebtrekkConfiguration.Builder(trackIds, "" )
         Webtrekk.getInstance().init( this , webtrekkConfiguration);