{"id":25936853,"url":"https://github.com/chartboost/chartboost-mediation-android-sdk-demo","last_synced_at":"2025-08-01T06:08:28.105Z","repository":{"id":39990939,"uuid":"153726959","full_name":"ChartBoost/chartboost-mediation-android-sdk-demo","owner":"ChartBoost","description":"The Android Chartboost Mediation SDK, by Chartboost, is a Unified-Auction \u0026 Mediated solution which helps developers increase their mobile apps' revenue with the inclusion of other supported Programmatic \u0026 Mediated SDKs.","archived":false,"fork":false,"pushed_at":"2025-06-05T13:47:50.000Z","size":577,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":36,"default_branch":"main","last_synced_at":"2025-06-05T14:36:57.133Z","etag":null,"topics":["android-sdk","chartboost-mediation","header-bidding","helium","sdk"],"latest_commit_sha":null,"homepage":"https://developers.chartboost.com/docs/get-started-with-mediation","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChartBoost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-10-19T04:33:23.000Z","updated_at":"2024-12-16T10:03:53.000Z","dependencies_parsed_at":"2025-04-15T10:26:43.152Z","dependency_job_id":"c76492fd-1a07-4666-a7fa-fcc5f38051ee","html_url":"https://github.com/ChartBoost/chartboost-mediation-android-sdk-demo","commit_stats":null,"previous_names":["chartboost/android-helium-sdk-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ChartBoost/chartboost-mediation-android-sdk-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-android-sdk-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-android-sdk-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-android-sdk-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-android-sdk-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChartBoost","download_url":"https://codeload.github.com/ChartBoost/chartboost-mediation-android-sdk-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-android-sdk-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268177857,"owners_count":24208397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-sdk","chartboost-mediation","header-bidding","helium","sdk"],"created_at":"2025-03-04T02:54:54.713Z","updated_at":"2025-08-01T06:08:28.061Z","avatar_url":"https://github.com/ChartBoost.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"Android Chartboost Mediation SDK\n====\n\nThe Android Chartboost Mediation SDK, by Chartboost, is a Unified-Auction \u0026 Mediated solution which helps developers increase their mobile apps' revenue with the inclusion of other supported Programmatic \u0026 Mediated SDKs.\n\n## Getting Started\n---\n\n### Before You Begin:\n1. Have you set up your app with Chartboost Mediation?\n2. Does your app have placements?\n\nIf not, simply add your app and create the placements in the Chartboost Mediation dashboard by following the [documentation here.](https://developers.chartboost.com/docs/mediation-import-apps)\n\n### Add Gradle Dependencies:\nTo quickly get started, simply add the following dependencies inside your app's `build.gradle`:\n\n```gradle\nrepositories {\n    maven {\n      name \"Chartboost Mediation's maven repo\"\n      url \"https://cboost.jfrog.io/artifactory/chartboost-mediation\"\n    }\n    maven {\n      name \"Chartboost Core's maven repo\"\n      url \"https://cboost.jfrog.io/artifactory/chartboost-core\"\n    }\n}\n\ndependencies {\n    ...\n\n    // Chartboost Mediation SDK\n    implementation(\"com.chartboost:chartboost-mediation-sdk:5.+\")\n    implementation(\"com.chartboost:chartboost-core-sdk:1.+\")\n\t\n    // Chartboost Mediation Adapters\n    implementation(\"com.chartboost:chartboost-mediation-adapter-chartboost:5.+\")\n\n    // Chartboost Mediation SDK Dependencies\n    implementation(\"androidx.core:core-ktx:1.9.0\")\n    implementation(\"androidx.lifecycle:lifecycle-common:2.5.1\")\n    implementation(\"androidx.lifecycle:lifecycle-runtime-ktx:2.6.2\")\n    implementation(\"androidx.activity:activity-compose:1.7.2\")\n    implementation(platform(\"androidx.compose:compose-bom:2023.03.00\"))\n    implementation(\"androidx.compose.ui:ui\")\n    implementation(\"androidx.compose.ui:ui-graphics\")\n    implementation(\"androidx.compose.ui:ui-tooling-preview\")\n    implementation(\"androidx.compose.material3:material3:1.2.0-alpha02\")\n\n    ...\n}\n```\n\n### Update your app's Manifest for Chartboost Mediation\n\n```XML\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n\u003cuses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" /\u003e\n```\n\nThese are optional\n```XML\n\u003cuses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.READ_PHONE_STATE\" /\u003e\n```\n\n### Google Play Services\n\n```Gradle\nimplementation \"com.google.android.gms:play-services-base:18.0.1\"\nimplementation \"com.google.android.gms:play-services-ads-identifier:18.0.1\"\n```\n\n## Start The Chartboost Mediation SDK:\n---\nIn your application's `onCreate` method, start the Chartboost Mediation SDK by providing your app's app id in an `SdkConfiguration` and passing it to `ChartboostCore.initializeSdk()`.\n\n```kotlin Kotlin\nval configuration = SdkConfiguration(\n    chartboostApplicationIdentifier = myHeliumAppId,\n    modules = listOf()\n)\nChartboostCore.initializeSdk(\n    context,\n    configuration,\n    object : ModuleObserver {\n        override fun onModuleInitializationCompleted(result: ModuleInitializationResult) {\n            if (result.moduleId == ChartboostMediationSdk.CORE_MODULE_ID) {\n\t            if (result.exception != null) {\n\t                Log.d(TAG,\"Chartboost Mediation SDK failed to initialize. Reason: ${result.exception.cause}\");\n\t            } else {\n\t                //SDK Started,\n\t                Log.d(TAG,\"Chartboost Mediation SDK initialized successfully\");\n\t            }\n            }\n        }\n    },\n)\n```\n\n## Creating Fullscreen Placements\n\nYou can implement the `ChartboostMediationFullscreenAdListener` interface to receive notifications about fullscreen ads loading, displaying, and closing.\n\n```kotlin Kotlin\nprivate fun createFullscreenAdListener(): ChartboostMediationFullscreenAdListener =\n    object : ChartboostMediationFullscreenAdListener {\n        override fun onAdClicked(ad: ChartboostMediationFullscreenAd) {\n            Log.d(TAG, \"Fullscreen ad clicked\")\n        }\n\n        override fun onAdClosed(\n            ad: ChartboostMediationFullscreenAd,\n            error: ChartboostMediationAdException?,\n        ) {\n            Log.d(TAG,\n                \"Fullscreen ad closed ${if (error != null) \"with error: ${error.chartboostMediationError}\" else \"successfully\"}\",\n            )\n        }\n\n        override fun onAdExpired(ad: ChartboostMediationFullscreenAd) {\n            Log.d(TAG, \"Fullscreen ad expired\")\n        }\n\n        override fun onAdImpressionRecorded(ad: ChartboostMediationFullscreenAd) {\n            Log.d(TAG, \"Fullscreen ad impression recorded\")\n        }\n\n        override fun onAdRewarded(ad: ChartboostMediationFullscreenAd) {\n            Log.d(TAG, \"Fullscreen ad rewarded\")\n        }\n    }\n```\n## Loading \u0026 Showing Fullscreen Ads\n\nTo load a fullscreen ad,\n```kotlin Kotlin\nval request = ChartboostMediationFullscreenAdLoadRequest([Your Placement Name], Keywords())\nval result =\n    ChartboostMediationFullscreenAd.loadFullscreenAd(\n        context,\n        request,\n        createFullscreenAdListener(),\n    )\nif (result.error != null) {\n    Log.d(TAG, \"Fullscreen ad failed to load with error: ${result.error?.cause}\")\n} else {\n    fullscreenAd = result.ad\n    Log.d(TAG, \"Fullscreen ad loaded successfully\")\n}\n```\n\nTo show the ad,\n```kotlin Kotlin\nval result = fullscreenAd?.show(context as Activity)\n\nif (result?.error != null) {\n    Log.d(TAG, \"Fullscreen ad failed to show with error: ${result.error?.cause}\")\n} else {\n    Log.d(TAG, \"Fullscreen ad shown successfully\")\n}\n```\n\n## Creating Banner Placements\n---\nIf you want banner ads, this is how to create, load, and show a banner ad. This is all done automatically.\n```kotlin Kotlin\nChartboostMediationBannerAdView(\n    context,\n    placementName,\n    size,\n    object : ChartboostMediationBannerAdViewListener {\n        override fun onAdClicked(placementName: String) {\n            Log.d(TAG, \"Banner ad clicked\")\n        }\n\n        override fun onAdImpressionRecorded(placementName: String) {\n            Log.d(TAG, \"Banner ad impression recorded\")\n        }\n\n        override fun onAdViewAdded(\n            placement: String,\n            child: View?,\n        ) {\n            Log.d(TAG, \"Banner ad view added\")\n        }\n    },\n)\n```\n\n## Test Mode\n---\nTo set the SDK to Test Mode, simply call the following method _after_ initializing the Chartboost Mediation SDK after its `start` method.\n```kotlin Kotlin\n// Start the Chartboost Core SDK first, before setting the sdk to Test Mode.\nChartboostCore.initializeSdk(...)\n// Set the Chartboost Mediation SDK to Test Mode. Make sure to remove this before deployment.\nChartboostMediationSdk.setTestMode(context, true)\n```\n\n## COPPA, GDPR \u0026 Additional Methods:\n\n---\nFor details on how to implement user privacy requirements, refer to the [Core SDK documentation](https://docs.chartboost.com/en/mediation/integrate/core/android/get-started/).\n\nNote: Not all partner SDKs have full support for GDPR. Please refer to its official documentation for more info on how the sdk handles GDPR.\n\n## 3rd-Party Supported Partner SDKs \u0026 Adapters\n---\nAs of 5.0.0, the Chartboost Mediation SDK currently supports the following 3rd-party programmatic \u0026 mediated partner sdks:\n\n* AdMob\n* Amazon Publisher Services\n* Applovin\n* Digital Turbine Exchange\n* Google Bidding\n* inMobi\n* ironSource\n* Meta Audience Network\n* Mintegral\n* MobileFuse\n* Pangle\n* UnityAds\n* Verve\n* Vungle\n\nTo integrate, add the adapter you need by updating your app's build.gradle:\n```Gradle\n\n    implementation(\"com.chartboost:chartboost-mediation-adapter-admob:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-amazon-publisher-services:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-applovin:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-digital-turbine-exchange:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-google-bidding:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-hyprmx:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-inmobi:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-ironsource:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-meta-audience-network:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-mintegral:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-mobilefuse:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-pangle:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-unity-ads:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-verve:5.+\")\n    implementation(\"com.chartboost:chartboost-mediation-adapter-vungle:5.+\")\n\n```\n\nFeel free to take a look at the Chartboost Mediation Demo app for an integration example\n\nFor more information, please read https://developers.chartboost.com/docs/get-started-with-mediation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchartboost%2Fchartboost-mediation-android-sdk-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchartboost%2Fchartboost-mediation-android-sdk-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchartboost%2Fchartboost-mediation-android-sdk-demo/lists"}