# Privacy Manager for the Android SDK

Use Privacy Manager to enable or disable Airship SDK features for privacy and consent management.

Privacy Manager allows you to control which Airship SDK features are enabled. This is particularly useful for consent opt-in flows where you need to disable all features initially, then enable them as users grant consent. For information about what data is collected for each Privacy Manager flag, see [SDK Data Collection](https://www.airship.com/docs/reference/data-collection/sdk-data-collection/).

When all features are disabled, the SDK operates in a no-op mode—it doesn't store data or make network requests. Once features are enabled, you can enable or disable specific features at runtime based on user consent.

## Privacy Manager flags

Each Privacy Manager flag controls a group of related Airship features. Enabling a flag enables all features within that group:


#### Kotlin



| Privacy Manager Flag | Kotlin Constant                            | AirshipConfig Value |
|----------------------|--------------------------------------------|---------------------|
| Push                 | PrivacyManager.Feature.PUSH                | push                |
| In-App Automation    | PrivacyManager.Feature.IN_APP_AUTOMATION   | in_app_automation   |
| Message Center       | PrivacyManager.Feature.MESSAGE_CENTER      | message_center      |
| Tags and Attributes  | PrivacyManager.Feature.TAGS_AND_ATTRIBUTES | tags_and_attributes |
| Contacts             | PrivacyManager.Feature.CONTACTS            | contacts            |
| Feature Flags        | PrivacyManager.Feature.FEATURE_FLAGS       | feature_flags       |
| Analytics            | PrivacyManager.Feature.ANALYTICS           | analytics           |
| All                  | PrivacyManager.Feature.ALL                 | all                 |
| None                 | PrivacyManager.Feature.NONE                | none                |



#### Java



| Privacy Manager Flag | Java Constant                              | AirshipConfig Value |
|----------------------|--------------------------------------------|---------------------|
| Push                 | PrivacyManager.Feature.PUSH                | push                |
| In-App Automation    | PrivacyManager.Feature.IN_APP_AUTOMATION   | in_app_automation   |
| Message Center       | PrivacyManager.Feature.MESSAGE_CENTER      | message_center      |
| Tags and Attributes  | PrivacyManager.Feature.TAGS_AND_ATTRIBUTES | tags_and_attributes |
| Contacts             | PrivacyManager.Feature.CONTACTS            | contacts            |
| Feature Flags        | PrivacyManager.Feature.FEATURE_FLAGS       | feature_flags       |
| Analytics            | PrivacyManager.Feature.ANALYTICS           | analytics           |
| All                  | PrivacyManager.Feature.ALL                 | all                 |
| None                 | PrivacyManager.Feature.NONE                | none                |




## Configuring default enabled features

Default enabled features can be set in the Airship Config options passed to `takeOff` during SDK initialization. For information about setting up the Airship SDK and configuring `AirshipConfigOptions`, see [Android SDK Setup](https://www.airship.com/docs/developer/sdk-integration/android/installation/getting-started/).


#### Kotlin



**AirshipConfigOptions**


```kotlin
airshipConfigOptions {
    // ...
    setEnabledFeatures(PrivacyManager.Feature.PUSH)
}
```


**airshipconfig.properties**

```properties
enabledFeatures = push
```



#### Java



**AirshipConfigOptions**


```java
AirshipConfigOptions.newBuilder()
    // ...
    .setEnabledFeatures(PrivacyManager.Feature.PUSH)
    .build();
```


**airshipconfig.properties**


```properties
enabledFeatures = push
```




To fully disable data collection by default, set the enabled features to none.


#### Kotlin



**AirshipConfigOptions**


```kotlin
airshipConfigOptions {
  // ...
  setEnabledFeatures(PrivacyManager.Feature.NONE)
}
```


**airshipconfig.properties**


```properties
enabledFeatures = none
```



#### Java



**AirshipConfigOptions**


```java
AirshipConfigOptions.newBuilder()
    // ...
    .setEnabledFeatures(PrivacyManager.Feature.NONE)
    .build();
```


**airshipconfig.properties**


```properties
enabledFeatures = none
```




## Enabling features at runtime

You can enable or disable features at runtime based on user consent:


#### Kotlin


```kotlin
// Initially disable all features
val options = airshipConfigOptions {
    // ...
    setEnabledFeatures(PrivacyManager.Feature.NONE)
}

// Later, when user grants consent:
Airship.privacyManager.enableFeatures(
    PrivacyManager.Feature.PUSH,
    PrivacyManager.Feature.ANALYTICS
)
```



#### Java


```java
// Initially disable all features
AirshipConfigOptions options = AirshipConfigOptions.newBuilder()
    // ...
    .setEnabledFeatures(PrivacyManager.Feature.NONE)
    .build();

// Later, when user grants consent:
Airship.getPrivacyManager().enableFeatures(
    PrivacyManager.Feature.PUSH,
    PrivacyManager.Feature.ANALYTICS
);
```




> **Note:** If features are disabled after being previously enabled, the SDK may make a few network requests to opt the channel out to prevent notifications.


## Related documentation

- [SDK Data Collection](https://www.airship.com/docs/reference/data-collection/sdk-data-collection/) - Comprehensive overview of what data Airship collects for each Privacy Manager flag
- [Google Play Data Safety](https://www.airship.com/docs/reference/data-collection/google-play-data-safety/) - Reference for Google Play's Data Safety section
- [Analytics](https://www.airship.com/docs/developer/sdk-integration/android/analytics/) - Track user engagement with custom events, screen tracking, and associated identifiers

