Disable the Mobile SDK
You can include code commands that turn the mobile SDK on or off. For example, if a mobile app user goes to the app's Settings area on his device and decides to turn off SAS tracking, the mobile app should turn off the mobile SDK, thereby preventing any more data collection or the receipt of messages and spot content for that device.
Typically, this capability is provided to support privacy requirements and enable more complicated mobile apps to turn on tracking when certain use cases are applied.
- Run this code to turn
off the mobile SDK:
SASCollector.getInstance().shutdown(); - Run this code to start
the mobile SDK again:
SASCollector.getInstance().initialize(Context context);
The initialize method should be called from the application main thread. Initializing the mobile SDK in a background thread might cause unexpected behavior.