> ## 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.

# コンプライアンス

> MoEngage Android SDK でデータトラッキングを有効化または無効化し、ユーザーの同意を管理します。

# データトラッキングの有効化/無効化

MoEngage SDK によるカスタムイベントやユーザー属性のトラッキングを停止するには、[disableDataTracking()](https://moengage.github.io/android-api-reference/core/com.moengage.core/disable-data-tracking.html) API を使用します。データトラッキングが無効になっている場合でも、SDK は分析データの収集を継続します。

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

```java Java theme={null}
MoESdkStateHelper.disableDataTracking(context);
```

上記の API が呼び出されると、カスタムイベントやユーザー属性はトラッキングされなくなります。[enableDataTracking()](https://moengage.github.io/android-api-reference/core/com.moengage.core/enable-data-tracking.html) が呼び出されるまで、SDK はすべてのイベントを拒否します。\
イベントやユーザー属性のトラッキングを再開する場合は、以下の API を呼び出します。

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

```java Java theme={null}
MoESdkStateHelper.enableDataTracking(context);
```

# SDK の有効化/無効化

MoEngage SDK によるユーザー情報のトラッキングや MoEngage システムへのデータ送信を停止するには、[disableSdk()](https://moengage.github.io/android-api-reference/core/com.moengage.core/disable-sdk.html) API を使用します。

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

```java Java theme={null}
MoESdkStateHelper.disableSdk(context);
```

この API が呼び出されると、すべての SDK API が動作しなくなります。[enableSdk()](https://moengage.github.io/android-api-reference/core/com.moengage.core/enable-sdk.html) が呼び出されるまで、SDK は無効のままです。\
ユーザーの同意を得たら、以下の API を使用して SDK を有効にします。

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

```java Java theme={null}
MoESdkStateHelper.enableSdk(context);
```

# ユーザーデータの削除

2023 年 4 月、Google は [ユーザーアカウント削除ポリシー](https://android-developers.googleblog.com/2023/04/giving-people-more-control-over-their-data.html)を発表しました。このポリシーでは、アプリ内でアカウントを作成できる場合、ユーザーがアプリ内でアカウントを削除できるようにする必要があります。

この API を呼び出すと、MoEngage サーバーからユーザーデータ/プロファイルが削除されます。この API を呼び出すには、SDK バージョン **12.10.00** **以上**が必要です。

```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);
```

詳細については、[API ドキュメント](https://moengage.github.io/android-api-reference/core/com.moengage.core/-mo-e-core-helper/delete-user.html)を参照してください。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.