Add an ad client dependency (Android)

Enable Google IMA and Google DAI ad requests in your Android app.


The JWP Android SDK integrates the Google IMA and Google DAI SDKs that you can request ads.

Google IMA ads allow you to integrate multimedia ads into your websites and apps1. Google Dynamic Ad Insertion (DAI) allows you to serve video ads into live linear programming and video on demand content2.

1. Source: Interactive Media Ads SDKs
2. Source: Learn about Dynamic Ad Insertion (DAI)


πŸ’‘

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



Requirements



Add client dependency

Gradle

  1. In the build.gradle file of your app, add com.jwplayer:jwplayer-ima:x.x.x. Be sure to replace x.x.x with the dependency version number.

    dependencies {
      ...
      implementation 'com.jwplayer:jwplayer-core:x.x.x'
      implementation 'com.jwplayer:jwplayer-common:x.x.x'
      implementation 'com.jwplayer:jwplayer-ima:x.x.x'
      implementation 'com.google.ads.interactivemedia.v3:interactivemedia:${GOOGLE_IMA_VERSION}'
      implementation 'com.google.android.gms:play-services-ads-identifier
    :${GOOGLE_IMA_VERSION}'
    
    }
    
  2. Sync Gradle.


Local

  1. With your app open in Android Studio, click File > New > New Module... > Import .JAR / .AAR Package.
  2. Click Next.
  3. Select the jwplayer-ima-x.x.aar file from your computer.

    πŸ’‘

    If you do not have a jwplayer-ima-x.x.x.aar file on your computer, you can download the Android SDK .zip from your JWP dashboard.

  4. Click Finish.
  5. Click File > Project Structure... > Dependencies. Under Modules, be sure that your app is selected.
  6. Click the plus sign in the main panel.
  7. Select Module dependency.
  8. Select the checkbox next to the name of each dependency that needs to be added.
  9. Click OK.
  10. Click Apply.
  11. Click OK.


© 2007-2024 Longtail Ad Solutions, Inc.