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 boolean |
configure(android.app.Activity activity,
AdColonyAppOptions options,
java.lang.String appId,
java.lang.String... zoneIds)
Configures AdColony to play ads in your app.
|
static boolean |
configure(android.app.Activity activity,
java.lang.String appId,
java.lang.String... zoneIds)
Configures AdColony to play ads in your app.
|
static boolean |
configure(android.app.Application app,
AdColonyAppOptions options,
java.lang.String appId,
java.lang.String... zoneIds)
Configures AdColony to play ads in your app.
|
static boolean |
configure(android.app.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 |
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 |
requestNativeAdView(java.lang.String zoneId,
AdColonyNativeAdViewListener listener,
AdColonyAdSize size)
Deprecated.
|
static boolean |
requestNativeAdView(java.lang.String zoneId,
AdColonyNativeAdViewListener listener,
AdColonyAdSize size,
AdColonyAdOptions options)
Deprecated.
|
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 boolean configure(android.app.Activity activity,
@NonNull
java.lang.String appId,
@NonNull
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(android.app.Activity activity,
AdColonyAppOptions options,
@NonNull
java.lang.String appId,
@NonNull
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(android.app.Application app,
@NonNull
java.lang.String appId,
@NonNull
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(android.app.Application app,
AdColonyAppOptions options,
@NonNull
java.lang.String appId,
@NonNull
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(@NonNull java.lang.String zoneId)
zoneId - the String zone id representing the zone you want information about.AdColonyZonepublic static boolean notifyIAPComplete(@NonNull
java.lang.String productId,
@NonNull
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(@NonNull
java.lang.String productId,
@NonNull
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.@Deprecated
public static boolean requestNativeAdView(@NonNull
java.lang.String zoneId,
@NonNull
AdColonyNativeAdViewListener listener,
@NonNull
AdColonyAdSize size)
zoneId - the zone if from which to request the ad.listener - the AdColonyNativeAdViewListener to be notified upon
successful/unsuccessful request.size - the AdColonyAdSize object representing the desired width/height of the ad
view.AdColonyNativeAdView,
AdColonyNativeAdViewListener,
AdColonyAdSize@Deprecated
public static boolean requestNativeAdView(@NonNull
java.lang.String zoneId,
@NonNull
AdColonyNativeAdViewListener listener,
@NonNull
AdColonyAdSize size,
AdColonyAdOptions options)
zoneId - the zone if from which to request the ad.listener - the AdColonyNativeAdViewListener to be notified upon
successful/unsuccessful request.size - the AdColonyAdSize object representing the desired width/height of the ad
view.options - the optional options object to be passed along with this request.AdColonyNativeAdView,
AdColonyNativeAdViewListener,
AdColonyAdSizepublic static boolean setAppOptions(@NonNull
AdColonyAppOptions options)
options - the new AdColonyAppOptions object to be set.AdColonyAppOptionspublic static AdColonyAppOptions getAppOptions()
public static boolean setRewardListener(@NonNull
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(@NonNull
AdColonyCustomMessageListener listener,
java.lang.String type)
listener - the AdColonyCustomMessageListener to register.type - the type of message to listen for.AdColonyCustomMessage,
AdColonyCustomMessageListenerpublic static AdColonyCustomMessageListener getCustomMessageListener(@NonNull java.lang.String type)
type - the type of the message listener to retrieve.public static boolean removeCustomMessageListener(@NonNull
java.lang.String type)
type - the type of listener to remove.public static boolean clearCustomMessageListeners()
public static boolean requestInterstitial(@NonNull
java.lang.String zoneId,
@NonNull
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(@NonNull
java.lang.String zoneId,
@NonNull
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