admob.*

Type Library
Revision 2017.3145
Keywords ads, advertising, AdMob
Platforms Android, iOS
Sample https://github.com/coronalabs/plugins-sample-admob

Overview

The AdMob plugin allows developers to monetize users through AdMob static interstitial ads, video interstitial ads, rewarded video ads, and banner ads.

The AdMob plugin is only available to users who have purchased the Corona Professional Bundle or the AdMob plugin. This plugin lets you keep 100% of your ad revenue and allows you to manage your account/settings with AdMob directly.

Registration

Before you can use this plugin, you must register with AdMob.

Syntax

local admob = require( "plugin.admob" )

Functions

Events

Project Settings

To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

settings =
{
    plugins =
    {
        ["plugin.admob"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}
Important

If you are building for Android, you should remove any legacy inclusion of the ["plugin.google.play.services"] plugin from your build.settings.

Note

For Android, the following permissions/features are automatically added when using this plugin:

  • "android.permission.INTERNET"
  • "android.permission.ACCESS_NETWORK_STATE"