Immediate Data Send & Cleanup
    • 1 Minute to read
    • Dark
      Light

    Immediate Data Send & Cleanup

    • Dark
      Light

    Article summary

    This method allows you to immediately send tracking data and clean up the request database afterward. The method will remove the requests from the database once they are sent. However, please ensure that the application is both started and visible when using this method, as it won’t function if the app is in the background or closed.

    Method

    Webtrekk.getInstance().sendRequestsNowAndClean()

    This method sends all pending tracking requests immediately and cleans up the request queue afterward.

    Best Practices

    • Application Visibility: Ensure that the app is running and visible, as this method cannot be executed when the app is not in the foreground.

    • Usage: Only use this method when necessary, for example, before closing or switching contexts, to avoid missing tracking data.


    Was this article helpful?