| |
---|---|
Type | Library |
Corona Store | appnext |
Keywords | ads, advertising, appnext |
See also |
The appnext plugin can be used in your Corona project. It enables you to monetize users through Appnext interstitial, full-screen and rewarded video ads.
To use the plugin please register with Appnext. Once you get Placement Id(s) for your application you can start creating ads.
local appnext = require( "plugin.appnext" )
In order to use this plugin, you must activate the plugin at the Corona Store.
When you build using the Corona Simulator, the server automatically takes care of integrating the plugin into your project.
All you need to do is add an entry into a plugins
table of your build.settings
. The following is an example of a minimal build.settings
file:
settings =
{
plugins =
{
-- key is the name passed to Lua's 'require()'
["plugin.appnext"] =
{
-- required
publisherId = "com.appnext",
supportedPlatforms = { iphone=true, android=true }
},
["plugin.google.play.services"] =
{
publisherId = "com.coronalabs",
supportedPlatforms = { android=true }
},
},
}
If you have activated this plugin, you can download this plugin from the corresponding plugin page in the Corona Store.
If building for iOS, you must bypass App Transport Security (ATS) by adding the following to the plist table of build.settings. For more information on ATS, please see the Managing App Transport Security guide.
settings = { iphone = { plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, }, }, }
For Android, the following permissions/features are automatically added when using this plugin:
android = { usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS_NETWORK_STATE", }, },
You can access sample code here.
More support is available from the Appnext team:
Platform | Supported |
---|---|
iOS | Yes |
Android | Yes |
Android (GameStick) | No |
Android (Kindle) | No |
Android (NOOK) | No |
Android (Ouya) | No |
Mac App | No |
Win32 App | No |
Windows Phone 8 | No |
Corona Simulator (Mac) | No |
Corona Simulator (Win) | No |