SDK - Native

Quick Start

Prerequisite: Complete the SDK Installation first. Minimum SDK version required: 1.2.1.

Native Campaigns lets you display a scrollable list of campaigns directly in your app's UI. The SDK provides a default layout — you just drop it in and call load().


1. Set the Ad Unit ID

After Init, set the ad unit ID for native campaigns:

Get your Ad unit ID from the Developer Portalarrow-up-right.

2. Add the View to Your Layout

In your layout XML, add the MCNativeAdView:

3. Load Campaigns

That's it. The SDK handles everything:

  • Fetches campaigns from the API

  • Shows a loading skeleton while fetching

  • Displays campaigns in a horizontal scrollable list

  • Tracks impressions automatically

  • Opens the campaign detail page on click


4. (Optional) Open Campaign Details In-App

By default, tapping a campaign opens the detail page in the device's external browser. To keep users inside your app using an in-app WebView:

If you enable this, you must also register the WebView activity in your AndroidManifest.xml:

Since this is the activity defined in the SDK - Offerwall, you can refer to its documentation if you want to set a title for it:

5. What Happens Behind the Scenes

When you call adView.load(), the SDK:

  1. Shows a pulsing skeleton placeholder that matches the layout direction

  2. Calls the API to fetch campaigns

  3. Replaces the skeleton with the campaign list

  4. Fires impression pixels automatically when each campaign becomes visible

  5. Opens the campaign detail page in the browser when the user taps a campaign

No manual tracking or click handling is needed.


Next Steps

Last updated