{"_id":"595e3174c6fd260015d25e2d","project":"574ff4bd3fa1870e00889ba6","version":{"_id":"574ff4bd3fa1870e00889ba9","project":"574ff4bd3fa1870e00889ba6","__v":20,"createdAt":"2016-06-02T08:56:29.492Z","releaseDate":"2016-06-02T08:56:29.492Z","categories":["574ff4bd3fa1870e00889baa","577278ecdceb570e003a9001","577279865617b117009e643f","577279985617b117009e6440","577279bc8c48e00e00503504","5774fe18605b770e0037be8a","577ce3ad87acf617003c4187","577f8476a77c700e006a6c52","57b486ae0d2b640e00e9d3f5","57b722133d3e620e004ec74b","57bd95f00fe3a00e003e2cc5","57c8349359cd4b0e00b888ef","57c8349b5754fa1700b12242","57cedb0bad483e0e00890239","57cedbe807d7ea0e00e438cc","57d82967156ef72b007ffcd8","58ee353ad1ee2f0f0034a13d","596623221738df00298622a5","59a51730192dba000fc9ca38","59a8129f1e7b26000fa0fb1a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"category":{"_id":"57b486ae0d2b640e00e9d3f5","__v":0,"project":"574ff4bd3fa1870e00889ba6","version":"574ff4bd3fa1870e00889ba9","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-08-17T15:45:50.062Z","from_sync":false,"order":7,"slug":"native-ads-mediation-layer","title":"Android SDK"},"user":"5770fa1ce5a0000e0023c680","__v":2,"parentDoc":null,"updates":["5971f12d4b01cc001b8bbb6e","597f1b7981a71f0014606190"],"next":{"pages":[],"description":""},"createdAt":"2017-07-06T12:47:48.345Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":16,"body":"This guide is intended for publishers who are interested in serving banner and fullscreen interstitial ads from PubNative using the Admob mediation network. This document will include help the setting up of the mediation adapter with your Android application.\n[block:api-header]\n{\n  \"title\": \"Integrating PubNative AdMob Adapter\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"maven { url \\\"https://dl.bintray.com/pubnative/maven\\\" }\",\n      \"language\": \"text\",\n      \"name\": \"Add in the repositories:\"\n    }\n  ]\n}\n[/block]\n**[Bintray AdMob Adapter](https://bintray.com/pubnative/maven/adapters.admob.beta/10.2.6-2.0.1.62)** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"dependencies {\\n\\t...\\n\\tcompile ‘net.pubnative:adapters.admob:10.2.6-2.0.1.62`\\n}\\n\",\n      \"language\": \"text\",\n      \"name\": \"2. Add PubNative Admob Adapter to the Gradle dependencies:\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"(for interstitials) Add a Custom Event in your Admob account\"\n}\n[/block]\n1. Sign in to your Admob account\n\n2. Choose an application to configure mediation\n\n3. Create new Ad Unit\n\n4. Go to Mediation section\n\n5. Create a new mediation or modify existing one\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/8659b91-AdMob_Mediation.png\",\n        \"AdMob Mediation.png\",\n        852,\n        603,\n        \"#dd4338\"\n      ]\n    }\n  ]\n}\n[/block]\n6. Choose an Interstitial type\n\n7. Add new Custom Event\n\n8. Setup all parameters as you want at next screen, and go to next\n\n9. Enter class name\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"net.pubnative.sdk.adapters.admob.PNInterstitialAdapter\",\n      \"language\": \"text\",\n      \"name\": \"Interstitial Class Name\"\n    }\n  ]\n}\n[/block]\n10. In parameters add the string with app token and placement name, like this: {\"app_token\":<YOUR_APP_TOKEN>,\"placement\":<PLACEMENT_NAME>}\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/94efdb0-AdMob3.png\",\n        \"AdMob3.png\",\n        794,\n        419,\n        \"#8e8588\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"(for banners) Add a Custom Event in your Admob account\"\n}\n[/block]\n1. Sign in to your Admob account\n\n2. Choose an application to configure mediation\n\n3. Create new Ad Unit\n\n4. Go to Mediation section\n\n5. Create a new mediation or modify existing one\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/80d3919-AdMob_Mediation.png\",\n        \"AdMob Mediation.png\",\n        852,\n        603,\n        \"#dd4338\"\n      ]\n    }\n  ]\n}\n[/block]\n6. Choose a Banner type\n\n7. Add new Custom Event\n\n8. Setup all parameters as you want at next screen, and go to next\n\n9. Enter class name\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"net.pubnative.sdk.adapters.admob.PNBannerAdapter\",\n      \"language\": \"text\",\n      \"name\": \"Banner Class Name\"\n    }\n  ]\n}\n[/block]\n10. In parameters add the string with app token and placement name, like this: {\"app_token\":<YOUR_APP_TOKEN>,\"placement\":<PLACEMENT_NAME>}\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/75b2e70-AdMob_4.png\",\n        \"AdMob 4.png\",\n        793,\n        423,\n        \"#8a8b8c\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"admob-adapter","type":"basic","title":"AdMob Adapter Android"}

AdMob Adapter Android


This guide is intended for publishers who are interested in serving banner and fullscreen interstitial ads from PubNative using the Admob mediation network. This document will include help the setting up of the mediation adapter with your Android application. [block:api-header] { "title": "Integrating PubNative AdMob Adapter" } [/block] [block:code] { "codes": [ { "code": "maven { url \"https://dl.bintray.com/pubnative/maven\" }", "language": "text", "name": "Add in the repositories:" } ] } [/block] **[Bintray AdMob Adapter](https://bintray.com/pubnative/maven/adapters.admob.beta/10.2.6-2.0.1.62)** [block:code] { "codes": [ { "code": "dependencies {\n\t...\n\tcompile ‘net.pubnative:adapters.admob:10.2.6-2.0.1.62`\n}\n", "language": "text", "name": "2. Add PubNative Admob Adapter to the Gradle dependencies:" } ] } [/block] [block:api-header] { "title": "(for interstitials) Add a Custom Event in your Admob account" } [/block] 1. Sign in to your Admob account 2. Choose an application to configure mediation 3. Create new Ad Unit 4. Go to Mediation section 5. Create a new mediation or modify existing one [block:image] { "images": [ { "image": [ "https://files.readme.io/8659b91-AdMob_Mediation.png", "AdMob Mediation.png", 852, 603, "#dd4338" ] } ] } [/block] 6. Choose an Interstitial type 7. Add new Custom Event 8. Setup all parameters as you want at next screen, and go to next 9. Enter class name [block:code] { "codes": [ { "code": "net.pubnative.sdk.adapters.admob.PNInterstitialAdapter", "language": "text", "name": "Interstitial Class Name" } ] } [/block] 10. In parameters add the string with app token and placement name, like this: {"app_token":<YOUR_APP_TOKEN>,"placement":<PLACEMENT_NAME>} [block:image] { "images": [ { "image": [ "https://files.readme.io/94efdb0-AdMob3.png", "AdMob3.png", 794, 419, "#8e8588" ] } ] } [/block] [block:api-header] { "title": "(for banners) Add a Custom Event in your Admob account" } [/block] 1. Sign in to your Admob account 2. Choose an application to configure mediation 3. Create new Ad Unit 4. Go to Mediation section 5. Create a new mediation or modify existing one [block:image] { "images": [ { "image": [ "https://files.readme.io/80d3919-AdMob_Mediation.png", "AdMob Mediation.png", 852, 603, "#dd4338" ] } ] } [/block] 6. Choose a Banner type 7. Add new Custom Event 8. Setup all parameters as you want at next screen, and go to next 9. Enter class name [block:code] { "codes": [ { "code": "net.pubnative.sdk.adapters.admob.PNBannerAdapter", "language": "text", "name": "Banner Class Name" } ] } [/block] 10. In parameters add the string with app token and placement name, like this: {"app_token":<YOUR_APP_TOKEN>,"placement":<PLACEMENT_NAME>} [block:image] { "images": [ { "image": [ "https://files.readme.io/75b2e70-AdMob_4.png", "AdMob 4.png", 793, 423, "#8a8b8c" ] } ] } [/block]