mediaBrix.*

Type Library
Revision Release 2022.3683
Keywords ads, advertising, MediaBrix
Platforms Android, iOS
Sample https://github.com/coronalabs/plugins-sample-mediabrix

Overview

The MediaBrix plugin allows developers to monetize users through MediaBrix static interstitials, video interstitials, rewarded videos, and more.

Registration

To use this plugin, you must register with MediaBrix as follows:

  1. Sign up for a developer account here.

  2. After submission, MediaBrix will review your application and a member of the MediaBrix Business Development team will reach out to you.

  3. Once MediaBrix approves your account, you may set your password and login for the MediaBrix publisher access portal.

  4. When logged in, select "Submit App" from the menu to submit a new app. After submission, a MediaBrix Developer Support manager will review the form and create the IDs and keys required to integrate your app with MediaBrix (usually within 24 hours).

Syntax

local mediaBrix = require( "plugin.mediaBrix" )

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.mediaBrix"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}

Important

If building for iOS, you must bypass App Transport Security (ATS) by adding the following to the plist table of build.settings. While we do not blindly encourage this approach for all developers and projects, bypassing ATS is required in certain cases. For more information on ATS, please see the Managing App Transport Security guide.

settings =
{
    iphone =
    {
        plist =
        {
            NSAppTransportSecurity = { NSAllowsArbitraryLoads=true },
        },
    },
}
Note

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

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

Support