Android SDK

Metica Ads SDK - Native Android Integration Guide

Overview

The Metica Ads SDK supports native Android applications, offering seamless integration for monetizing your apps with ads. This guide will help you integrate the SDK into your native Android application.

Prerequisites

  • Android API level 21 or higher

  • Kotlin or Java development

  • Valid Metica API credentials (API key, App ID)

  • AppLovin MaxSdk dependency version 13.0.0 or higher

Installation

To add the Metica Ads SDK, include the following dependency in your build.gradle.kts file:

dependencies {
    implementation("com.metica:metica-sdk:+")
}

Initialization

⚠️ CRITICAL REQUIREMENT: You must initialize the AppLovin SDK after the Metica SDK initialization succeeds and before invoking any ad methods to ensure proper ad loading.

Initialize the SDK Place the SDK initialization code in your Application class or main Activity:


Interstitial Ads

Load Interstitial Ad

Show Interstitial Ad


Rewarded Ads

Load Rewarded Ad

Show Rewarded Ad


API Reference

Core Classes

Metica

Main entry point for SDK initialization.

  • initialize(context, config, callback) - Initialize the SDK

MeticaInitConfig

Configuration for SDK initialization.

MeticaAds

Main class for ad operations.

  • loadInterstitial(callback) - Load an interstitial ad

  • showInterstitial(activity, callback) - Show an interstitial ad

  • isInterstitialReady() - Check if interstitial ad is ready\

  • loadRewarded(callback) - Load a rewarded ad

  • showRewarded(activity, callback) - Show a rewarded ad

  • isRewardedReady() - Check if rewarded ad is ready

MeticaAd

Callbacks

MeticaInitCallback

MeticaAdsLoadCallback

MeticaAdsShowCallback


Best practices

Thread Safety

All SDK methods are thread-safe and callbacks are delivered on the calling thread.

Activity Parameter

Always pass the current Activity to show methods. The activity must be active when showing ads.

Logging

Enable debug logging during development:

Last updated

Was this helpful?