---
title: "Install Groups"
description: "Control which Android builds can see updates for each other using install groups."
url: https://docs.sentry.io/platforms/android/build-distribution/install-groups/
---

# Install Groups | Sentry for Android

This feature is available only if you're in the [Early Adopter program](https://docs.sentry.io/organization/early-adopter-features.md). Features available to Early Adopters are still in-progress and may have bugs. We recognize the irony.

Install groups let you tag builds with one or more group names to control update visibility between builds. See the [product documentation](https://docs.sentry.io/product/build-distribution.md#install-groups) for a full explanation of how install groups work.

## [Uploading With Install Groups](https://docs.sentry.io/platforms/android/build-distribution/install-groups.md#uploading-with-install-groups)

### [Sentry CLI](https://docs.sentry.io/platforms/android/build-distribution/install-groups.md#sentry-cli)

Pass `--install-group` one or more times:

```bash
sentry-cli build upload app.apk \
  --org your-org \
  --project your-project \
  --build-configuration Release \
  --install-group alpha \
  --install-group staging
```

### [Gradle Plugin](https://docs.sentry.io/platforms/android/build-distribution/install-groups.md#gradle-plugin)

Set `installGroups` in the `distribution` block:

`build.gradle.kts`

```kotlin
sentry {
  distribution {
    enabled = true
    installGroups.set(setOf("alpha", "staging"))
  }
}
```

### [Fastlane Plugin](https://docs.sentry.io/platforms/android/build-distribution/install-groups.md#fastlane-plugin)

Pass the `install_groups` parameter:

`Fastfile`

```ruby
sentry_upload_build(
  org_slug: 'your-org',
  project_slug: 'your-project',
  apk_path: 'path/to/app.apk',
  build_configuration: 'Release',
  install_groups: ['alpha', 'staging']
)
```

## [How Install Groups Work With the Auto-Update SDK](https://docs.sentry.io/platforms/android/build-distribution/install-groups.md#how-install-groups-work-with-the-auto-update-sdk)

When the Auto-Update SDK checks for updates, the API returns the single latest build (highest semver version, with build number as tiebreaker) whose install groups overlap with the filter:

* If the SDK **provides groups explicitly**, the API uses those to filter.
* If the SDK **doesn't provide groups**, the API falls back to looking up the uploaded build by `buildVersion` and `buildNumber` and using that build's install groups. If multiple builds share the same version and build number, the API picks the most recently uploaded one, which may lead to unexpected results.

We recommend configuring the SDK to send install groups explicitly to ensure deterministic filtering.

### [Gradle Plugin](https://docs.sentry.io/platforms/android/build-distribution/install-groups.md#gradle-plugin-1)

The Gradle plugin's `installGroups` config handles this automatically:

1. **Upload**: Passes `--install-group` flags to sentry-cli so the build is tagged on Sentry.
2. **Embed**: Writes the groups to `sentry-distribution.properties` inside the APK (as `io.sentry.distribution.install-groups-override`). The [Auto-Update SDK](https://docs.sentry.io/platforms/android/build-distribution/auto-update.md) reads this value at runtime and sends the groups explicitly as query parameters.

### [Programmatic Override](https://docs.sentry.io/platforms/android/build-distribution/install-groups.md#programmatic-override)

If you need the SDK to filter by different groups than what the build was uploaded with (for example, based on a feature flag or user setting), you can override them via `SentryOptions`:

```kotlin
SentryAndroid.init(context) { options ->
    options.distribution.installGroups = setOf("beta", "internal")
}
```

This overrides the groups the SDK sends when checking for updates. It does not change the groups the build was tagged with on Sentry.
