This doc describes the setup for the deprecated analytics collector v2. We highly recommend upgrading to the latest version as described [here](🔗).
# How to set up the Android Collector
Bitmovin Analytics enables you to get useful insights into the video usage in your apps. Our Android Collector offers a simple integration with our Bitmovin Player, the Exoplayer and the Amazon IVS Player.
In order to follow along this guide, you need at least a basic setup of your chosen Player. If you haven't set up your Player yet, go to the corresponding Player documentation pages: [Bitmovin Player getting started guide](🔗), [ExoPlayer documentation](🔗), [Amazon IVS Player documentation](🔗).
You also need to set up your analytics license and allowlist your domain. If you haven't done this yet, go to our [How to Set Up](🔗) page and follow the steps there.
### Platform requirements:
Collector | Supported Android Version |
Bitmovin Player Collector | Android 4.1+ |
Exoplayer Collector | Android 4.1+ |
Amazon IVS Player Collector | Android 5+ |
## Step 1: Add the SDK to Your Project.
### Add the Bitmovin release repository to your project
Add a link to our release repository to your application's `build.gradle
` file. In addition to that, the google maven repository must be added.
### Add the Dependency to the Project
Add the Bitmovin Analytics Android SDK as a dependency to your main project's `build.gradle
` file as shown below, while replacing `{Version Number}
` with the desired SDK version number. The available SDK versions are listed in our [Release Notes](🔗). We recommend to always stay up to date with both player and collector versions. However if you are using an older player version, check out which collector version you should use at our [Android Collector Github page](🔗).
## Step 2: Setup the Collector
First create a basic `BitmovinAnalyticsConfig
` object by using your Bitmovin analytics license key and optionally your Bitmovin Player Key. You can further customise it by adding optional configuration parameters. For more information and a complete list of configuration fields see our [Configuration Guide](🔗).
Please replace `ANALYTICS_LICENSE_KEY
` with a license key from your account. Please checkout [How to set up](🔗) to learn more about how to get to your analytics license.
Create the collector object by passing the config object. Finally attach your player to the collector. Always detach your player from the collector once you are done, e.g. when calling the `player.release()
` method.
When switching to a new video we recommend that you follow the sequence of events below.
## Step 3: Check Statistics in Dashboard
After the setup is done there is nothing more to do. Events are recorded automatically and you can head over to the [Analytics Dashboard](🔗) to see statistics.
## Examples
You can find fully functional code examples in our [Github Repository](🔗).