Android Integration

This guide shows how to integrate Nexx360 Direct InApp with the Google Mobile Ads SDK on Android.

circle-info

The Nexx360 Direct InApp call must be made before the Google Ad Manager ad request. The returned targeting key-values must be set on the AdManagerAdRequest before calling loadAd().

Prerequisites

Integration Flow

1. App starts ad loading
2. App calls Nexx360 /directinapp endpoint (HTTP GET)
3. Nexx360 returns targeting key-values
4. App creates AdManagerAdRequest with targeting key-values
5. App loads ad via Google Ad Manager SDK

Step 1: Add Network Permission

Ensure your AndroidManifest.xml includes internet permission:

<uses-permission android:name="android.permission.INTERNET" />

Step 2: Create the Nexx360 Helper

Create a helper class to call the Nexx360 endpoint and parse the response:

Step 3: Load a Banner Ad with Nexx360 Targeting

Step 4: Full Activity Example

Using Placement Instead of Tag ID

If your Nexx360 setup uses placements, pass the placement parameter instead of tag_id:

If your app collects GDPR consent (e.g., via a CMP), pass the consent string:

circle-exclamation

Last updated

Was this helpful?