> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Compliance

> Enable or disable data tracking and manage user consent in the MoEngage Android SDK.

# Enable/Disable Data Tracking

If you don't want the MoEngage SDK not to track user data to the MoEngage System use the [disableDataTracking()](https://moengage.github.io/android-api-reference/core/com.moengage.core/disable-data-tracking.html) API.

<CodeGroup>
  ```kotlin Kotlin wrap theme={null}
  import com.moengage.core.disableDataTracking
  disableDataTracking(context)
  ```

  ```java Java theme={null}
  MoESdkStateHelper.disableDataTracking(context);
  ```
</CodeGroup>

Once the above API is called, no custom events or user attributes will be tracked. SDK will reject all events until [enableDataTracking()](https://moengage.github.io/android-api-reference/core/com.moengage.core/enable-data-tracking.html) is called.\
Once you want to track events or user attributes, call the below API.

<CodeGroup>
  ```kotlin Kotlin wrap theme={null}
  import com.moengage.core.enableDataTracking
  enableDataTracking(context)
  ```

  ```java Java theme={null}
  MoESdkStateHelper.enableDataTracking(context);
  ```
</CodeGroup>

# Enable/Disable SDK

If you don't want the MoEngage SDK not to track any user information or send any data to the MoEngage System, use the [disableSdk()](https://moengage.github.io/android-api-reference/core/com.moengage.core/disable-sdk.html) API.

<CodeGroup>
  ```kotlin Kotlin wrap theme={null}
  import com.moengage.core.disableSdk
  disableSdk(context)
  ```

  ```java Java theme={null}
  MoESdkStateHelper.disableSdk(context);
  ```
</CodeGroup>

Once this API is called, all the SDK APIs will be non-operational. SDK will be disabled until [enableSdk()](https://moengage.github.io/android-api-reference/core/com.moengage.core/enable-sdk.html) is called.\
Once you have the user's consent use the below API to enable the SDK.

<CodeGroup>
  ```kotlin Kotlin wrap theme={null}
  import com.moengage.core.enableSdk
  enableSdk(context)
  ```

  ```java Java theme={null}
  MoESdkStateHelper.enableSdk(context);
  ```
</CodeGroup>

# Delete User Data

In April 2023, Google Announced the [User Account Deletion Policy](https://android-developers.googleblog.com/2023/04/giving-people-more-control-over-their-data.html), according to which if your app allows you to create an account within your app, it must also allow the user to delete their account within the app.

Calling this API will delete the User Data/Profile from the MoEngage Server. You need to have a minimum SDK version of **12.10.00** or **above**to call this API.

<CodeGroup>
  ```kotlin Kotlin wrap theme={null}
  import com.moengage.core.MoECoreHelper
  MoECoreHelper.deleteUser(context,listener)
  ```

  ```java Java theme={null}
  import com.moengage.core.MoECoreHelper;
  MoECoreHelper.INSTANCE.deleteUser(context,listener);
  ```
</CodeGroup>

For more information, refer to the [API Documentation.](https://moengage.github.io/android-api-reference/core/com.moengage.core/-mo-e-core-helper/delete-user.html)
