Add an ad client dependency (Android v3)

Enable Google IMA, Google DAI, and FreeWheel ad requests in your app


🚧

If you are not using FreeWheel Ad Manager, Google DAI, or Google IMA to serve your ads, skip to Schedule VAST ads.


The JWP SDK for Android integrates several ad client SDKs that you can use to request ads:

  • FreeWheel Ad Manager
  • Google DAI
  • Google IMA


Requirements



Gradle

  1. In the build.gradle file of your app, add the dependency from the following table. Be sure to replace x.x.x with the dependency version number.
Ad clientJWP dependency
FreeWheel Ad Manager
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β 
com.longtailvideo.jwplayer:jwplayer-freewheel:x.x.x
Google DAI / IMAcom.longtailvideo.jwplayer:jwplayer-ima:x.x.x
  1. (FreeWheel only) Add FreeWheel's Ad Manager dependency.
  2. Sync Gradle.

dependencies {
  ...
  implementation 'com.longtailvideo.jwplayer:jwplayer-core:x.x.x'
  implementation 'com.longtailvideo.jwplayer:jwplayer-common:x.x.x'
  implementation '{jw_player_dependency}'
  implementation '{freewheel_admanager_dependency}'
}


Local

  1. With your app open in Android Studio, click File > New > New Module... > Import .JAR / .AAR Package.
  2. Click Next.
  3. Select the .aar file from your computer. The list of required .aar files are listed in the table below.

Ad clientDependency file
FreeWheel Ad Managerjwplayer-freewheel-x.x.x.aar
FWAdManager.aar
Google DAI / IMAjwplayer-ima-x.x.x.aar
  1. Click Finish.
  2. Repeat steps 1-4 for each dependency file that needs to be added.
  3. Click File > Project Structure... > Dependencies. Under Modules, be sure that your app is selected.
  4. Click the plus sign in the main panel.
  5. Select Module dependency.
  6. Select the checkbox next to the name of each dependency that needs to be added.
  7. Click OK.
  8. Click Apply.
  9. Click OK.