---
agentTools:
  projectIndex: https://developers.appnext.com/llms.txt
---

# Fullscreen Video

Android SDK Admob Adapter - Fullscreen video ad unit

[block:callout]
{
  "type": "warning",
  "body": "Each placement has a Placement ID. If you integrate multiple placements, you will need to use a different Placement ID for each.",
  "title": "Important Note"
}
[/block]

[block:api-header]
{
  "title": "Adding Appnext Fullscreen to Admob"
}
[/block]

Please follow the steps below to integrate Appnext’s adaptor for Admob

\##Step 1: Login to your AdMob account and configure Appnext

As explained above, you must have an AdMob account, and an associated app within this account, in order to integrate Appnext

\##Step 2: Within your AdMob account, press the “Apps” button and choose your app from the ‘All apps’ list:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/1cead3c-Group_1.png",
        "Group 1.png",
        474,
        221,
        "#000000"
      ]
    }
  ]
}
[/block]

\##Step 3: Create an ad unit

* Select the app for which you want to add a new ad unit from your app list on the left side menu.
* Click on “Ad Units” from the app screen.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/2acc286-Group_2.png",
        "Group 2.png",
        272,
        432,
        "#000000"
      ]
    }
  ]
}
[/block]

* Click on the 'Get Started' button -
  Note: If it's not your first Ad unit implementation, click on 'Add Ad Unit'

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/a9f0556-Group_4.png",
        "Group 4.png",
        801,
        301,
        "#000000"
      ]
    }
  ]
}
[/block]

* Choose the 'Interstitial' Ad Unit -

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/709ace4-Group_6.png",
        "Group 6.png",
        705,
        432,
        "#000000"
      ]
    }
  ]
}
[/block]

* Configure your new ad unit
  * Enter a name for your ad unit
* Click on Advanced settings
  * Make sure both text, images, and videos are checked

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/ef92799-Group_29.png",
        "Group 29.png",
        686,
        407,
        "#000000"
      ]
    }
  ]
}
[/block]

* Please add the App ID to your project manifest file
  Note: If it's not your first Ad unit implementation skip this step.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/fae85ff-Group_9.png",
        "Group 9.png",
        745,
        361,
        "#000000"
      ]
    }
  ]
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "<meta-data\n            android:name=“com.google.android.gms.ads.APPLICATION_ID”\n            android:value=“ca-app-pub-3899300681756284~5575119254\"/>",
      "language": "text"
    }
  ]
}
[/block]

* After the Ad Unit is created successfully, please press on Meditation button

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/130df5a-Group_3.png",
        "Group 3.png",
        272,
        432,
        "#000000"
      ]
    }
  ]
}
[/block]

Then, press on create Medition Group button -

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/9c0e293-Group_10.png",
        "Group 10.png",
        526,
        238,
        "#000000"
      ]
    }
  ]
}
[/block]

Choose Ad Format and Platform -

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/942099d-Group_26.png",
        "Group 26.png",
        512,
        226,
        "#000000"
      ]
    }
  ]
}
[/block]

Enter Mediation Group name and click on Add Ad units -

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/221f9e4-Group_28.png",
        "Group 28.png",
        710,
        366,
        "#000000"
      ]
    }
  ]
}
[/block]

Select your app:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/a4452a3-Group_27.png",
        "Group 27.png",
        457,
        386,
        "#000000"
      ]
    }
  ]
}
[/block]

## Step 4: Under the Waterfall section

* Press on Add Custom Events
* Set Label and an eCPM value

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/c0c55ed-Group_14.png",
        "Group 14.png",
        800,
        234,
        "#000000"
      ]
    }
  ]
}
[/block]

## Step 5: Configure eCPM

You should allocate the Appnext eCPM manually in order for Appnext to show ads in your AdMob SDK.
You can configure the eCPM for the Appnext network in the ‘Mediation’ page and press ‘Save’ after each change:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/8b31a44-Group_15.png",
        "Group 15.png",
        463,
        320,
        "#000000"
      ]
    }
  ]
}
[/block]

* In the “Custom Event” details fill the following details:
  * Class name: `com.appnext.sdk.adapters.admob.ads.AppnextAdMobCustomEventFullScreenVideo`
  * Parameter: Appnext Placement ID

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/3845d9b-Group_24.png",
        "Group 24.png",
        612,
        313,
        "#000000"
      ]
    }
  ]
}
[/block]

* Finally, press ‘Done’ at the bottom of the page.

* Choose the ‘Ad unit’ you want to add Appnext’s custom event from the ‘Ad units’ list by pressing its ‘ad sources’ link

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/cdbffc5-Group_19.png",
        "Group 19.png",
        596,
        639,
        "#000000"
      ]
    }
  ]
}
[/block]

* Click the "Save" button on the "Mediation" page to save the newly added ‘Ad Network‘

## Step 6: You’re all done!

Your AdMob SDK should start showing Appnext ads immediately. If Appnext ads are not shown, check the eCPM allocation and make sure it’s high enough so it will give Appnext priority.

[block:api-header]
{
  "title": "Configuring the ad unit - Fullscreen"
}
[/block]

The Appnext SDK provides an option to change the ad unit’s configuration.
By default, the SDK configuration will be loaded from Appnext's server, but you can choose to change it directly by creating a FullscreenConfig object for the FullScreenVideo, and call any of the following setters before loading the ad by the AdMob loadAd interface.

[block:code]
{
  "codes": [
    {
      "code": "FullscreenConfig config = new FullscreenConfig();\nconfig.setButtonColor(\"#ffffff\");\nconfig.setButtonText(\"Install\");\nconfig.setPostback(\"Your_Postback_Params\");\nconfig.setCategories(\"Categories\");\nconfig.setMute(false);\nconfig.setProgressType(FullScreenVideo.PROGRESS_CLOCK);\nconfig.setProgressColor(\"#ffffff\");\nconfig.setVideoLength(FullScreenVideo.VIDEO_LENGTH_DEFAULT);\nconfig.setOrientation(FullScreenVideo.ORIENTATION_AUTO);\n\nBundle customEventExtras = new Bundle();\ncustomEventExtras.putSerializable(AppnextAdMobCustomEvent.AppnextConfigurationExtraKey, config);\nAdRequest adRequest = new AdRequest.Builder().addCustomEventExtrasBundle(AppnextAdMobCustomEventFullScreenVideo.class, customEventExtras).build();\nmCustomisedCustomEventFullScreen.loadAd(adRequest);",
      "language": "java"
    }
  ]
}
[/block]

**List of configurable options**

Roll screen caption time `setRollCaptionTime`
The number of seconds that the google play text caption is showing. The caption is shown to the user after clicking the Call-to-action button. The function (`setRollCaptionTime`) can accepts values from 1 to 20. The default value is 3 seconds. Entering -1 will make the caption visible until the video finish to play

Category `setCategories`
Set preferred ad categories

Install Postback `setPostback`
Postback parameters that will be posted to your server after user installed an app (make sure to encode the values)

Mute Video `setMute`
Mute the video which is played in the ad (default is "false")

* true
* false

Fullscreen - Show Close Button `setShowClose`
Display or hide the "x" (close) button

* true
* false

Video Length `setVideoLength`
Set video length - 15 or 30 seconds long (default is `VIDEO_LENGTH_DEFAULT`)
`VIDEO_LENGTH_SHORT` - Up to 15 seconds long videos
`VIDEO_LENGTH_LONG` - 20-60 seconds long videos
`VIDEO_LENGTH_DEFAULT` - Appnext's algorithm priority. Any available video campaign will be served

Please note that if no SHORT type length videos are available, long videos will be served

Orientation `setOrientation`
Set the preferred orientation if both landscape and portrait are supported by the application (default is `ORIENTATION_DEFAULT`). The ad unit displayed orientation cannot be changed by the user after the ad unit started.
`FullScreenVideo.ORIENTATION_DEFAULT`
`FullScreenVideo.ORIENTATION_LANDSCAPE`
`FullScreenVideo.ORIENTATION_PORTRAIT`

Show/Hide Call-to-action button `setShowCta`
Set if the call-to-action button is visible to the user in the roll screen. The Default value is true.

[block:api-header]
{
  "title": "App Categories"
}
[/block]

[block:parameters]
{
  "data": {
    "0-0": "1. Action\n2. Adventure\n3. Arcade\n4. Arcade & Action\n5. Board\n6. Books & Reference\n7. Brain & Puzzle\n8. Business\n9. Card\n10. Cards & Casino\n11. Casino\n12. Casual\n13. Comics\n14. Communications\n15. Education\n16. Educational\n17. Entertainment\n18. Family\n19. Finance\n20. Health & Fitness\n21. Libraries & Demo\n22. Lifestyle\n23. Live Wallpaper",
    "0-1": "24. Media & Video\n25. Medical\n26. Music\n27. Music & Audio\n28. News & Magazines\n29. Personalization\n30. Photography\n31. Productivity\n32. Puzzle\n33. Racing\n34. Role Playing\n35. Shopping\n36. Simulation\n37. Social\n38. Sports\n39. Sports Games\n40. Strategy\n41. Tools\n42. Travel & Local\n43. Trivia\n44. Weather\n45. Word"
  },
  "cols": 2,
  "rows": 1
}
[/block]

Should you have any problems integrating the product, log a ticket with us by emailing <support@appnext.com>

[block:api-header]
{
  "title": "Integration Support"
}
[/block]

Should you have any problems integrating the product, log a ticket with us by emailing <support@appnext.com>