--- title: "Opt-out of Tracking" slug: "mapp-intelligence-android-sdk-v5-opt-out-tracking" description: "Exclude users from tracking in Mapp Intelligence Android SDK v5 with opt-out controls and cached request handling." updated: 2026-04-24T10:45:43Z published: 2026-04-24T10:45:43Z canonical: "docs.mapp.com/mapp-intelligence-android-sdk-v5-opt-out-tracking" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Opt-out of Tracking Use opt-out when a user must be fully excluded from tracking. The SDK stores the opt-out state and stops accepting further tracking data while opt-out is active. > [!WARNING] > Important > > The SDK must already be initialized before you call these methods. ## Methods | Method | Description | | --- | --- | | `optOut(value: Boolean, sendCurrentData: Boolean = false)` | Enables or disables opt-out. When enabling opt-out, you can decide whether already cached requests should be sent first. | | `hasOptOut()` | Returns whether opt-out is currently active. | ## What happens when opt-out is enabled - The opt-out state is stored by the SDK. - Tracking is disabled for incoming requests. - Scheduled send jobs are cancelled. - If `sendCurrentData` is `true`, cached requests are sent and then cleaned up. - If `sendCurrentData` is `false`, cached requests are deleted immediately. ## Examples ```kotlin // Enable opt-out and delete cached data immediately Webtrekk.getInstance().optOut(value = true, sendCurrentData = false) // Enable opt-out but send cached data first Webtrekk.getInstance().optOut(value = true, sendCurrentData = true) // Disable opt-out and resume tracking Webtrekk.getInstance().optOut(value = false) // Check the current state val isOptOutActive = Webtrekk.getInstance().hasOptOut() ``` ## When to use it - Apply a privacy choice that requires full tracking exclusion. - Stop tracking immediately for a user at runtime. Related pages: [Anonymous Tracking](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-anonymous-tracking), [Immediate Data Send & Cleanup](https://docs.mapp.com/docs/en/mapp-intelligence-android-sdk-v5-immediate-data-send-cleanup).