This page provides an overview of the installation steps when using AAR files to manually install the Streaming Video & Ads agent. For the complete installation with code examples, use the guided install.
Clone the video-agent-android repository.
Open it with Android Studio.
Go to View > Tool Windows > Gradle to open the Gradle tool window.
In the Gradle tool window, unfold NRVideoProject > Tasks > build and double-click assemble. This will build the project and generate the AAR library files inside each module's folder build > outputs > aar.
In your project, go to File > New > New Module, import .JAR/.AAR package and click Next.
Select the AAR files you generated in the previous step and click Finish.
Repeat steps 5 and 6 for each AAR file you need:
- NewRelicVideoCore.aar (Required): Core video agent functionality
- NRExoPlayerTracker.aar (Required): ExoPlayer tracking
- NRIMATracker.aar (Optional): Ad tracking with IMA SDK
In your app module's build.gradle file, add the following dependencies:
dependencies { ... implementation project(":NewRelicVideoCore") // Required: Core video agent implementation project(":NRExoPlayerTracker") // Required: ExoPlayer tracking implementation project(':NRIMATracker') // Optional: Ad tracking with IMA}Note: Only include NRIMATracker if you need ad tracking functionality.
Sync your project with Gradle files by clicking Sync Now in the notification bar, or go to File > Sync Project with Gradle Files.
Initialize the video agent
In your application's onCreate() method or activity, initialize the New Relic video agent. For detailed code examples and implementation instructions, refer to the guided install.
Set up video player tracking
Configure the tracker based on your needs:
ExoPlayer tracker only: Set up ExoPlayer tracking for video playback monitoring
ExoPlayer and IMA trackers: Set up both ExoPlayer and IMA tracking for video playback and ad tracking

For complete implementation code examples, see the guided install.
Build and deploy your application to see the video tracking data in New Relic.
What's next?
- View your data: Learn about the different views available in New Relic to monitor your streaming video and ads
- Compatibility requirements: Check supported platforms and versions
- Update the agent: Keep your agent up to date