# pop.onl > pop.onl is a free ad mediation for mobile apps and games, with crypto settlement and AI-made ads. The app adds the > pop.onl SDK plus the SDKs of the ad networks it uses; pop.onl calls those networks directly, in the waterfall order > set on https://pop.onl (no other mediation such as LevelPlay or MAX in between). Formats: rewarded, interstitial. To add pop.onl to an app: 1. Sign in at https://pop.onl, add the app, copy its app key (po_app_...). 2. On pop.onl, turn on the ad networks and enter the app's ids from each network (AdMob app id, Unity game id, ...). 3. Install the SDK for the app's framework (below) with the adapters for those networks, then call initialize with the app key, and showRewarded / showInterstitial with a placement name. Every SDK has the same calls: initialize(appKey), setConsent(bool), setChildDirected(bool), setUserId(string), isRewardedReady(placement), showRewarded(placement) -> earned, isInterstitialReady(placement), showInterstitial(placement). --- # pop.onl Ads for Unity Free ad mediation. One app key from pop.onl, a waterfall you edit on the web, and the networks' own SDKs doing the ads. ## Install 1. Install the ad network SDKs you use. pop.onl is the mediation, so add networks, not another mediation (remove LevelPlay or MAX if you switch). - AdMob: Google Mobile Ads Unity plugin 9.0+ (`com.google.ads.mobile` or the .unitypackage). Put your AdMob app id in its settings (Assets > Google Mobile Ads > Settings). - Unity Ads: `com.unity.ads` 4.x (Package Manager, "Advertisement Legacy"). 2. Add this package. Package Manager > + > Add package from git URL: `https://github.com/poponl/sdk.git?path=unity/com.poponl.sdk` or from disk (`Packages/manifest.json`): `"com.poponl.sdk": "file:../path/to/com.poponl.sdk"` 3. Adapters switch on by themselves when their network SDK is present (the editor adds `POPONL_ADMOB`, `POPONL_UNITYADS` defines). ### Android: every network On Android the package can also run pop.onl's native adapters, so any of the 17 networks works without a Unity plugin from that network: AdMob, Unity Ads, Pangle, Liftoff, Mintegral, InMobi, Chartboost, DT Exchange, Yandex, BIGO Ads, myTarget, Smaato, Ogury, Start.io, LINE (FiveAd), SuperAwesome, YSO Network. 1. Install the External Dependency Manager (`com.google.external-dependency-manager`; the AdMob plugin already has it). 2. Menu pop.onl > Android networks: tick the networks, Save. This writes `Assets/PopOnl/Editor/PopOnlAndroidDependencies.xml`. 3. Assets > External Dependency Manager > Android Resolver > Resolve. If a network's Unity plugin is in the project (AdMob, Unity Ads), leave that network off in the list: the C# adapter is used and the native one would only add a second copy of the SDK. ## Use ```csharp using PopOnl; void Start() { PopOnlAds.SetConsent(true); // from your consent prompt PopOnlAds.Initialize("po_app_XXXXXXXXXXXXXXXXXXXX"); } void OnRewardButton() { if (!PopOnlAds.IsRewardedReady("revive")) return; PopOnlAds.ShowRewarded("revive", earned => { if (earned) GiveReward(); }); } void OnLevelEnd() => PopOnlAds.ShowInterstitial("level_end"); ``` - `placement` is matched to the ad unit that lists it on pop.onl; otherwise the first unit of that format is used. - Callbacks run on Unity's main thread. - Options: `new PopOnlOptions { Verbose = true }` logs each waterfall step; `ApiBaseUrl` points to another server. ## How it works - `GET /sdk/v1/config` (header `X-PO-App-Key`) returns network ids and the waterfall for the device's country. It is saved and refreshed every 10 minutes, so ads keep working offline with the last copy. - Each ad unit keeps one ad loaded: lines are tried in order and lines priced under the floor are skipped. When all fail it retries after 30 s, doubling to 5 min. - Events (request, fill, no_fill, show, impression with revenue, click, reward, close) go to `POST /sdk/v1/events` in batches. The device id is a random id made on first run, not an advertising id. ## Not yet Banners, server-side reward checks (S2S), native adapters on iOS. --- # pop.onl Android SDK Free ad mediation. pop.onl calls each ad network's own SDK directly, in the waterfall order you set on [pop.onl](https://pop.onl); no other mediation sits in between. Formats: rewarded and interstitial. - Core `onl.pop:ads` has no dependencies (Android framework only). - One adapter per network, `onl.pop:ads-`, which brings that network's SDK with it. - minSdk 24, Java 17. ## Install `settings.gradle.kts`: ```kotlin dependencyResolutionManagement { repositories { google() mavenCentral() maven { url = uri("https://maven.pop.onl") } // Only for the networks you add (each publishes on its own server): maven { url = uri("https://artifact.bytedance.com/repository/pangle") } // pangle maven { url = uri("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea") } // mintegral maven { url = uri("https://cboost.jfrog.io/artifactory/chartboost-ads/") } // chartboost maven { url = uri("https://s3.amazonaws.com/smaato-sdk-releases/") } // smaato maven { url = uri("https://maven.ogury.co") } // ogury maven { url = uri("https://aa-sdk.s3-eu-west-1.amazonaws.com/android_repo") } // superawesome maven { url = uri("https://ysonetwork.s3.eu-west-3.amazonaws.com/sdk/android") } // ysonetwork } } ``` `app/build.gradle.kts` — the core plus one line per network you turned on at pop.onl: ```kotlin dependencies { implementation("onl.pop:ads:0.1.0") implementation("onl.pop:ads-admob:0.1.0") implementation("onl.pop:ads-unityads:0.1.0") // ... } ``` ## Use ```kotlin class App : Application() { override fun onCreate() { super.onCreate() PopOnlAds.setConsent(true) // from your consent dialog (GDPR); leave unset if unknown PopOnlAds.setChildDirected(false) // COPPA PopOnlAds.initialize(this, "YOUR_APP_KEY") } } // In an Activity: if (PopOnlAds.isRewardedReady("level_end")) { PopOnlAds.showRewarded(this, "level_end") { earned -> if (earned) giveCoins() } } if (PopOnlAds.isInterstitialReady()) PopOnlAds.showInterstitial(this, "between_levels") ``` The app key is on pop.onl → Apps. Adapters on the classpath register themselves; nothing else to call. Ads load in the background and reload after each show. Callbacks run on the main thread. ## Networks | Network | Adapter | Set on pop.onl (app) | Line id | |---|---|---|---| | AdMob | `ads-admob` | app_id (also put it in AndroidManifest `com.google.android.gms.ads.APPLICATION_ID`) | ad unit id | | Unity Ads | `ads-unityads` | game_id | placement id | | Pangle | `ads-pangle` | app_id | placement id | | Liftoff (Vungle) | `ads-liftoff` | app_id | placement reference id | | Mintegral | `ads-mintegral` | app_id, app_key | `placement_id/unit_id` | | InMobi | `ads-inmobi` | account_id | placement id (number) | | Chartboost | `ads-chartboost` | app_id, app_signature | location | | DT Exchange | `ads-dtexchange` | app_id | spot id | | Yandex | `ads-yandex` | — | ad unit id | | BIGO Ads | `ads-bigo` | app_id | slot id | | myTarget | `ads-mytarget` | — | slot id (number) | | Smaato | `ads-smaato` | publisher_id | ad space id | | Ogury | `ads-ogury` | asset_key | ad unit id | | Start.io | `ads-startio` | app_id | ad tag (optional) | | LINE (FiveAd) | `ads-line` | app_id | slot id | | SuperAwesome | `ads-superawesome` | — | placement id (number) | | YSO Network | `ads-ysonetwork` | — | key | Bidding-only networks (Meta, AppLovin, Moloco, Amazon, PubMatic, MobileFuse, Verve) are listed on pop.onl but have no adapter yet: they sell through bidding, which pop.onl does not run yet. ## Build from source ```bash ./gradlew publish # writes every module to build/repo ``` Checking the adapters with no downloads, against a local Gradle cache: ```bash tools/offline-libs.sh ~/.gradle/caches/modules-2/files-2.1 /tmp/offline-libs ./gradlew --offline -Ppoponl.offlineLibs=/tmp/offline-libs compileReleaseKotlin ``` --- # pop.onl iOS SDK Free ad mediation. pop.onl calls each ad network's own SDK directly, in the waterfall order you set on [pop.onl](https://pop.onl); no other mediation sits in between. Formats: rewarded and interstitial. iOS 13+. > Status: written against each network's documented API, not yet compiled on a Mac. Treat 0.1.0 as a preview. ## Install CocoaPods (all adapters): ```ruby pod 'PopOnlAds' # core pod 'PopOnlAds/AdMob' # one line per network you turned on at pop.onl pod 'PopOnlAds/UnityAds' pod 'PopOnlAds/Pangle' pod 'PopOnlAds/Liftoff' pod 'PopOnlAds/InMobi' ``` Swift Package Manager (core and AdMob): add `https://github.com/poponl/sdk`, products `PopOnlAds`, `PopOnlAdMob`. Each network also asks for its own Info.plist entries (SKAdNetworkItems; for AdMob, `GADApplicationIdentifier`). Copy them from the network's docs. ## Use ```swift import PopOnlAds // AppDelegate PopOnlAds.setConsent(true) // from your consent prompt (GDPR); leave unset if unknown PopOnlAds.initialize(appKey: "po_app_XXXXXXXXXXXXXXXXXXXX") // A view controller if PopOnlAds.isRewardedReady("revive") { PopOnlAds.showRewarded(from: self, placement: "revive") { earned in if earned { giveReward() } } } PopOnlAds.showInterstitial(from: self, placement: "level_end") ``` Adapters in the app register themselves (classes named `PopOnlAdapter_`). Callbacks run on the main thread. ## Networks | Network | Subspec | Set on pop.onl (app) | Line id | |---|---|---|---| | AdMob | `AdMob` | — (app id in Info.plist) | ad unit id | | Unity Ads | `UnityAds` | game_id_ios or game_id | placement id | | Pangle | `Pangle` | app_id | placement id | | Liftoff (Vungle) | `Liftoff` | app_id | placement reference id | | InMobi | `InMobi` | account_id | placement id (number) | Next on iOS: Mintegral, Chartboost, DT Exchange, Yandex, BIGO Ads, myTarget, Smaato, Ogury, Start.io, LINE, SuperAwesome, YSO Network (all have Android adapters already). --- # @poponl/react-native-ads pop.onl ad mediation for React Native and Expo. Rewarded and interstitial ads from the ad networks' own SDKs, in the waterfall order set on [pop.onl](https://pop.onl). Wraps the pop.onl Android and iOS SDKs. ## Expo ```bash npx expo install @poponl/react-native-ads ``` `app.json`: ```json { "expo": { "plugins": [ ["@poponl/react-native-ads", { "networks": ["admob", "unityads", "pangle"], "admobAndroidAppId": "ca-app-pub-XXXXXXXX~XXXXXXXX", "admobIosAppId": "ca-app-pub-XXXXXXXX~XXXXXXXX" }] ] } } ``` Then `npx expo prebuild` (or an EAS build). It does not run in Expo Go. ## Bare React Native ```bash npm install @poponl/react-native-ads ``` - Android, `android/gradle.properties`: `poponl.networks=admob,unityads,pangle`, and add `maven { url "https://maven.pop.onl" }` (plus the network repositories listed in the Android SDK README) to the project repositories. - iOS, `ios/Podfile`: `pod 'PopOnlAds/AdMob'` and one line per network, then `pod install`. ## Use ```js import PopOnlAds from '@poponl/react-native-ads'; PopOnlAds.setConsent(true); // from your consent prompt await PopOnlAds.initialize('po_app_XXXXXXXXXXXXXXXXXXXX'); if (await PopOnlAds.isRewardedReady('revive')) { const earned = await PopOnlAds.showRewarded('revive'); if (earned) giveReward(); } await PopOnlAds.showInterstitial('level_end'); ``` `initialize` resolves once a config is in use; on a first run with no network it waits until one arrives. Networks: Android has all 17 (admob, unityads, pangle, liftoff, mintegral, inmobi, chartboost, dtexchange, yandex, bigo, mytarget, smaato, ogury, startio, line, superawesome, ysonetwork). iOS has admob, unityads, pangle, liftoff, inmobi so far. --- # poponl_ads pop.onl ad mediation for Flutter. Rewarded and interstitial ads from the ad networks' own SDKs, in the waterfall order set on [pop.onl](https://pop.onl). Wraps the pop.onl Android and iOS SDKs. ## Install ```bash flutter pub add poponl_ads ``` Android, `android/gradle.properties` (the networks you turned on at pop.onl): ```properties poponl.networks=admob,unityads,pangle ``` and in `android/settings.gradle` (or `build.gradle`) repositories: `maven { url "https://maven.pop.onl" }` plus the network repositories listed in the pop.onl Android SDK README. AdMob also needs its app id in AndroidManifest (`com.google.android.gms.ads.APPLICATION_ID`). iOS, `ios/Podfile`, inside the Runner target: ```ruby pod 'PopOnlAds/AdMob' pod 'PopOnlAds/Pangle' ``` AdMob also needs `GADApplicationIdentifier` in Info.plist. ## Use ```dart import 'package:poponl_ads/poponl_ads.dart'; await PopOnlAds.setConsent(true); // from your consent prompt await PopOnlAds.initialize('po_app_XXXXXXXXXXXXXXXXXXXX'); if (await PopOnlAds.isRewardedReady('revive')) { final earned = await PopOnlAds.showRewarded('revive'); if (earned) giveReward(); } await PopOnlAds.showInterstitial('level_end'); ``` Networks: Android has all 17; iOS has admob, unityads, pangle, liftoff, inmobi so far. --- # @poponl/capacitor-ads pop.onl ad mediation for Capacitor and Ionic (Capacitor 6+). Rewarded and interstitial ads from the ad networks' own SDKs, in the waterfall order set on [pop.onl](https://pop.onl). Wraps the pop.onl Android and iOS SDKs. ## Install ```bash npm install @poponl/capacitor-ads npx cap sync ``` - Android, `android/gradle.properties`: `poponl.networks=admob,unityads,pangle`; add `maven { url "https://maven.pop.onl" }` (and the network repositories from the pop.onl Android SDK README) to the project repositories. - iOS, `ios/App/Podfile`: `pod 'PopOnlAds/AdMob'`, one line per network, then `npx cap sync ios`. - AdMob also needs its app id: AndroidManifest `com.google.android.gms.ads.APPLICATION_ID`, Info.plist `GADApplicationIdentifier`. ## Use ```ts import { PopOnlAds } from '@poponl/capacitor-ads'; await PopOnlAds.setConsent(true); // from your consent prompt await PopOnlAds.initialize('po_app_XXXXXXXXXXXXXXXXXXXX'); if (await PopOnlAds.isRewardedReady('revive')) { const earned = await PopOnlAds.showRewarded('revive'); if (earned) giveReward(); } await PopOnlAds.showInterstitial('level_end'); ``` Networks: Android has all 17; iOS has admob, unityads, pangle, liftoff, inmobi so far. --- # pop.onl Ads for Godot 4 pop.onl ad mediation for Godot 4.2+ (Android). Rewarded and interstitial ads from the ad networks' own SDKs, in the waterfall order set on [pop.onl](https://pop.onl). Wraps the pop.onl Android SDK. ## Install 1. Copy `addons/poponl_ads` into your project, with `bin/poponl-godot-release.aar` (build it from `android/`: `gradle assembleRelease`, then copy `build/outputs/aar/*-release.aar` to `addons/poponl_ads/bin/poponl-godot-release.aar`). 2. Project > Project Settings > Plugins: enable "pop.onl Ads". It adds the `PopOnlAds` autoload. 3. Project Settings > `pop_onl/android/networks`: the networks you turned on at pop.onl, comma separated (`admob,unityads,pangle`). All 17 Android networks are available. 4. Android export: enable "Use Gradle Build". AdMob also needs its app id in the Android manifest (`com.google.android.gms.ads.APPLICATION_ID`). ## Use ```gdscript func _ready(): PopOnlAds.set_consent(true) # from your consent prompt PopOnlAds.initialize("po_app_XXXXXXXXXXXXXXXXXXXX") func _on_revive_pressed(): if PopOnlAds.is_rewarded_ready("revive"): var earned: bool = await PopOnlAds.show_rewarded("revive") if earned: give_reward() func _on_level_end(): await PopOnlAds.show_interstitial("level_end") ``` iOS is not supported yet (Godot iOS plugins need a native build of their own).