Skip to main content

Disable or restart the SDK

You can completely stop the Adtrace SDK in certain situations. While stopped, the SDK does not track sessions or events. You can start it again later with restart.

Unlike offline mode, stopping the SDK halts all SDK activity rather than only pausing network sends.

Stop / restartOffline mode
TrackingStops completelyContinues locally
NetworkSuspendedSuspended
Can resumeYes, with restart()Yes, with switchBackToOnlineMode()

Method signatures

Adtrace.stop();
Adtrace.restart();

Stop the SDK

Adtrace.stop();

Restart the SDK

Adtrace.restart();
note

stop() is reversible with restart(). For permanent user opt-out that notifies the backend, use GDPR forget me instead.