public class AdColony
extends java.lang.Object
| Constructor and Description |
|---|
AdColony() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
addCustomMessageListener(AdColonyCustomMessageListener listener,
java.lang.String type)
Call this method to set the AdColonyCustomMessageListener for custom message events in
your app.
|
static boolean |
clearCustomMessageListeners()
Used to clear all currently registered AdColonyCustomMessageListeners.
|
static java.lang.String |
collectSignals()
Deprecated.
|
static void |
collectSignals(AdColonySignalsListener listener)
Gathers AdColony specific information to be passed into OpenRTB bid requests from a mediation setting.
|
static boolean |
configure(Activity activity,
AdColonyAppOptions options,
java.lang.String appId,
java.lang.String... zoneIds)
Configures AdColony to play ads in your app.
|
static boolean |
configure(Activity activity,
java.lang.String appId,
java.lang.String... zoneIds)
Configures AdColony to play ads in your app.
|
static boolean |
configure(Application app,
AdColonyAppOptions options,
java.lang.String appId,
java.lang.String... zoneIds)
Configures AdColony to play ads in your app.
|
static boolean |
configure(Application app,
java.lang.String appId,
java.lang.String... zoneIds)
Configures AdColony to play ads in your app.
|
static boolean |
disable()
Disables AdColony from requesting and showing ads and destroys any existing VM modules for
the rest of the app session.
|
static AdColonyAppOptions |
getAppOptions()
Used to retrieve the currently set app options for this session.
|
static AdColonyCustomMessageListener |
getCustomMessageListener(java.lang.String type)
Used to retrieve the currently registered AdColonyCustomMessageListener.
|
static AdColonyRewardListener |
getRewardListener()
Used to retrieve the global reward listener for this app session.
|
static java.lang.String |
getSDKVersion()
Used to retrieve the version String of the AdColony SDK.
|
static AdColonyZone |
getZone(java.lang.String zoneId)
Getter for AdColonyZone objects.
|
static boolean |
notifyIAPComplete(java.lang.String productId,
java.lang.String transId)
Used to provide AdColony with IAP information.
|
static boolean |
notifyIAPComplete(java.lang.String productId,
java.lang.String transId,
java.lang.String currencyCode,
double price)
Used to provide AdColony with IAP information.
|
static boolean |
removeCustomMessageListener(java.lang.String type)
Used to remove a specific AdColonyCustomMessageListener.
|
static boolean |
removeRewardListener()
Removes the internal reference to the reward listener to allow for collection.
|
static boolean |
requestAdView(java.lang.String zoneId,
AdColonyAdViewListener listener,
AdColonyAdSize size)
Asynchronous request for an AdColonyAdView object (returned to the user via the
AdColonyInterstitialListener).
|
static boolean |
requestAdView(java.lang.String zoneId,
AdColonyAdViewListener listener,
AdColonyAdSize size,
AdColonyAdOptions options) |
static boolean |
requestInterstitial(java.lang.String zoneId,
AdColonyInterstitialListener listener)
Call this method to request an interstitial advertisement.
|
static boolean |
requestInterstitial(java.lang.String zoneId,
AdColonyInterstitialListener listener,
AdColonyAdOptions options)
Call this method to request an interstitial advertisement.
|
static boolean |
setAppOptions(AdColonyAppOptions options)
Used to update/replace app options at runtime.
|
static boolean |
setRewardListener(AdColonyRewardListener listener)
Call this method to set the AdColonyRewardListener for global reward callbacks for your app.
|
public static boolean disable()
public static void collectSignals(AdColonySignalsListener listener)
listener - The AdColonySignalsListener to be notified of success/failure.@Deprecated public static java.lang.String collectSignals()
collectSignals(AdColonySignalsListener)public static boolean configure(Activity activity,
java.lang.String appId,
java.lang.String... zoneIds)
activity - the activity that the configure request is called from.appId - your app identifier gathered from the AdColony dashboard.zoneIds - any number of zone ids gathered from the AdColony dashboard for your app.public static boolean configure(Activity activity,
AdColonyAppOptions options,
java.lang.String appId,
java.lang.String... zoneIds)
activity - the activity that the configure request is called from.options - the optional AdColonyAppOptions object to be sent.appId - your app identifier gathered from the AdColony dashboard.zoneIds - any number of zone ids gathered from the AdColony dashboard for your app.public static boolean configure(Application app,
java.lang.String appId,
java.lang.String... zoneIds)
app - the app that the configure request is called from.appId - your app identifier gathered from the AdColony dashboard.zoneIds - any number of zone ids gathered from the AdColony dashboard for your app.public static boolean configure(Application app,
AdColonyAppOptions options,
java.lang.String appId,
java.lang.String... zoneIds)
AdColonyAppOptions object to AdColony.app - the Application that the configure request is called from.options - the optional AdColonyAppOptions object to be sent.appId - your app identifier gathered from the AdColony dashboard.zoneIds - any number of zone ids gathered from the AdColony dashboard for your app.AdColonyAppOptionspublic static AdColonyZone getZone(java.lang.String zoneId)
zoneId - the String zone id representing the zone you want information about.AdColonyZonepublic static boolean notifyIAPComplete(java.lang.String productId,
java.lang.String transId)
productId - the product id for the item that was purchased.transId - the transaction id for the item that was purchased.public static boolean notifyIAPComplete(java.lang.String productId,
java.lang.String transId,
java.lang.String currencyCode,
double price)
productId - the product id for the item that was purchased.transId - the transaction id for the item that was purchased.currencyCode - an optional currency code for the price.price - an optional price for the item that was purchased.public static boolean requestAdView(java.lang.String zoneId,
AdColonyAdViewListener listener,
AdColonyAdSize size)
zoneId - the AdColony zone id from which to request the adlistener - the AdColonyInterstitialListener to be notified upon
successful/unsuccessful requestsize - the AdColonyAdSize object representing the desired width/height of the ad view.AdColonyInterstitialListenerpublic static boolean requestAdView(java.lang.String zoneId,
AdColonyAdViewListener listener,
AdColonyAdSize size,
AdColonyAdOptions options)
zoneId - the AdColony zone id from which to request the ad.listener - the AdColonyAdViewListener to be notified upon successful/unsuccessful
request.size - the AdColonySize object representing the desired width/height of the ad view.options - the optional options object to be passed along with this request.public static boolean setAppOptions(AdColonyAppOptions options)
options - the new AdColonyAppOptions object to be set.AdColonyAppOptionspublic static AdColonyAppOptions getAppOptions()
public static boolean setRewardListener(AdColonyRewardListener listener)
listener - the AdColonyRewardListener object to register.AdColonyReward,
AdColonyRewardListenerpublic static boolean removeRewardListener()
public static java.lang.String getSDKVersion()
public static AdColonyRewardListener getRewardListener()
public static boolean addCustomMessageListener(AdColonyCustomMessageListener listener, java.lang.String type)
listener - the AdColonyCustomMessageListener to register.type - the type of message to listen for.AdColonyCustomMessage,
AdColonyCustomMessageListenerpublic static AdColonyCustomMessageListener getCustomMessageListener(java.lang.String type)
type - the type of the message listener to retrieve.public static boolean removeCustomMessageListener(java.lang.String type)
type - the type of listener to remove.public static boolean clearCustomMessageListeners()
public static boolean requestInterstitial(java.lang.String zoneId,
AdColonyInterstitialListener listener)
AdColonyInterstitialListener.onRequestFilled(AdColonyInterstitial)
callback. A request that was not filled will trigger the listener's
AdColonyInterstitialListener.onRequestNotFilled(AdColonyZone) callback.zoneId - the zone identifier of the zone you wish to request an interstitial
advertisement from.listener - the listener object to be alerted in response to the request.AdColonyInterstitialListenerpublic static boolean requestInterstitial(java.lang.String zoneId,
AdColonyInterstitialListener listener,
AdColonyAdOptions options)
AdColonyInterstitialListener.onRequestFilled(AdColonyInterstitial)
callback. A request that was not filled will trigger the listener's
AdColonyInterstitialListener.onRequestNotFilled(AdColonyZone zone) callback.zoneId - the zone identifier of the zone you wish to request an interstitial
advertisement from.listener - the listener object to be alerted in response to the request.options - the optional ad options to be sent along with this request.AdColonyInterstitialListener,
AdColonyAdOptions